mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-e04f316d6434a50d/out/
cubepilot.rs

1#![doc = "MAVLink cubepilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
25#[cfg_attr(feature = "ts", derive(TS))]
26#[cfg_attr(feature = "ts", ts(export))]
27#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
28#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29#[cfg_attr(feature = "serde", serde(tag = "type"))]
30#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31#[repr(u32)]
32#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
33pub enum ActuatorConfiguration {
34    #[doc = "Do nothing."]
35    ACTUATOR_CONFIGURATION_NONE = 0,
36    #[doc = "Command the actuator to beep now."]
37    ACTUATOR_CONFIGURATION_BEEP = 1,
38    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
39    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
40    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
41    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
42    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
43    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
44    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
45    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
46}
47impl ActuatorConfiguration {
48    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
49}
50impl Default for ActuatorConfiguration {
51    fn default() -> Self {
52        Self::DEFAULT
53    }
54}
55#[cfg_attr(feature = "ts", derive(TS))]
56#[cfg_attr(feature = "ts", ts(export))]
57#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
58#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59#[cfg_attr(feature = "serde", serde(tag = "type"))]
60#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
61#[repr(u32)]
62#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
63pub enum ActuatorOutputFunction {
64    #[doc = "No function (disabled)."]
65    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
66    #[doc = "Motor 1"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
68    #[doc = "Motor 2"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
70    #[doc = "Motor 3"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
72    #[doc = "Motor 4"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
74    #[doc = "Motor 5"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
76    #[doc = "Motor 6"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
78    #[doc = "Motor 7"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
80    #[doc = "Motor 8"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
82    #[doc = "Motor 9"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
84    #[doc = "Motor 10"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
86    #[doc = "Motor 11"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
88    #[doc = "Motor 12"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
90    #[doc = "Motor 13"]
91    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
92    #[doc = "Motor 14"]
93    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
94    #[doc = "Motor 15"]
95    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
96    #[doc = "Motor 16"]
97    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
98    #[doc = "Servo 1"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
100    #[doc = "Servo 2"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
102    #[doc = "Servo 3"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
104    #[doc = "Servo 4"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
106    #[doc = "Servo 5"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
108    #[doc = "Servo 6"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
110    #[doc = "Servo 7"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
112    #[doc = "Servo 8"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
114    #[doc = "Servo 9"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
116    #[doc = "Servo 10"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
118    #[doc = "Servo 11"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
120    #[doc = "Servo 12"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
122    #[doc = "Servo 13"]
123    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
124    #[doc = "Servo 14"]
125    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
126    #[doc = "Servo 15"]
127    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
128    #[doc = "Servo 16"]
129    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
130}
131impl ActuatorOutputFunction {
132    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
133}
134impl Default for ActuatorOutputFunction {
135    fn default() -> Self {
136        Self::DEFAULT
137    }
138}
139#[cfg_attr(feature = "ts", derive(TS))]
140#[cfg_attr(feature = "ts", ts(export))]
141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
143#[cfg_attr(feature = "serde", serde(tag = "type"))]
144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
145#[repr(u32)]
146#[doc = "Enumeration of the ADSB altimeter types"]
147pub enum AdsbAltitudeType {
148    #[doc = "Altitude reported from a Baro source using QNH reference"]
149    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
150    #[doc = "Altitude reported from a GNSS source"]
151    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
152}
153impl AdsbAltitudeType {
154    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
155}
156impl Default for AdsbAltitudeType {
157    fn default() -> Self {
158        Self::DEFAULT
159    }
160}
161#[cfg_attr(feature = "ts", derive(TS))]
162#[cfg_attr(feature = "ts", ts(export))]
163#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
165#[cfg_attr(feature = "serde", serde(tag = "type"))]
166#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
167#[repr(u32)]
168#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
169pub enum AdsbEmitterType {
170    ADSB_EMITTER_TYPE_NO_INFO = 0,
171    ADSB_EMITTER_TYPE_LIGHT = 1,
172    ADSB_EMITTER_TYPE_SMALL = 2,
173    ADSB_EMITTER_TYPE_LARGE = 3,
174    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
175    ADSB_EMITTER_TYPE_HEAVY = 5,
176    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
177    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
178    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
179    ADSB_EMITTER_TYPE_GLIDER = 9,
180    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
181    ADSB_EMITTER_TYPE_PARACHUTE = 11,
182    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
183    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
184    ADSB_EMITTER_TYPE_UAV = 14,
185    ADSB_EMITTER_TYPE_SPACE = 15,
186    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
187    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
188    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
189    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
190}
191impl AdsbEmitterType {
192    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
193}
194impl Default for AdsbEmitterType {
195    fn default() -> Self {
196        Self::DEFAULT
197    }
198}
199bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
200impl AdsbFlags {
201    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
202}
203impl Default for AdsbFlags {
204    fn default() -> Self {
205        Self::DEFAULT
206    }
207}
208bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
209impl AisFlags {
210    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
211}
212impl Default for AisFlags {
213    fn default() -> Self {
214        Self::DEFAULT
215    }
216}
217#[cfg_attr(feature = "ts", derive(TS))]
218#[cfg_attr(feature = "ts", ts(export))]
219#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
221#[cfg_attr(feature = "serde", serde(tag = "type"))]
222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
223#[repr(u32)]
224#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
225pub enum AisNavStatus {
226    #[doc = "Under way using engine."]
227    UNDER_WAY = 0,
228    AIS_NAV_ANCHORED = 1,
229    AIS_NAV_UN_COMMANDED = 2,
230    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
231    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
232    AIS_NAV_MOORED = 5,
233    AIS_NAV_AGROUND = 6,
234    AIS_NAV_FISHING = 7,
235    AIS_NAV_SAILING = 8,
236    AIS_NAV_RESERVED_HSC = 9,
237    AIS_NAV_RESERVED_WIG = 10,
238    AIS_NAV_RESERVED_1 = 11,
239    AIS_NAV_RESERVED_2 = 12,
240    AIS_NAV_RESERVED_3 = 13,
241    #[doc = "Search And Rescue Transponder."]
242    AIS_NAV_AIS_SART = 14,
243    #[doc = "Not available (default)."]
244    AIS_NAV_UNKNOWN = 15,
245}
246impl AisNavStatus {
247    pub const DEFAULT: Self = Self::UNDER_WAY;
248}
249impl Default for AisNavStatus {
250    fn default() -> Self {
251        Self::DEFAULT
252    }
253}
254#[cfg_attr(feature = "ts", derive(TS))]
255#[cfg_attr(feature = "ts", ts(export))]
256#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
258#[cfg_attr(feature = "serde", serde(tag = "type"))]
259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
260#[repr(u32)]
261#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
262pub enum AisType {
263    #[doc = "Not available (default)."]
264    AIS_TYPE_UNKNOWN = 0,
265    AIS_TYPE_RESERVED_1 = 1,
266    AIS_TYPE_RESERVED_2 = 2,
267    AIS_TYPE_RESERVED_3 = 3,
268    AIS_TYPE_RESERVED_4 = 4,
269    AIS_TYPE_RESERVED_5 = 5,
270    AIS_TYPE_RESERVED_6 = 6,
271    AIS_TYPE_RESERVED_7 = 7,
272    AIS_TYPE_RESERVED_8 = 8,
273    AIS_TYPE_RESERVED_9 = 9,
274    AIS_TYPE_RESERVED_10 = 10,
275    AIS_TYPE_RESERVED_11 = 11,
276    AIS_TYPE_RESERVED_12 = 12,
277    AIS_TYPE_RESERVED_13 = 13,
278    AIS_TYPE_RESERVED_14 = 14,
279    AIS_TYPE_RESERVED_15 = 15,
280    AIS_TYPE_RESERVED_16 = 16,
281    AIS_TYPE_RESERVED_17 = 17,
282    AIS_TYPE_RESERVED_18 = 18,
283    AIS_TYPE_RESERVED_19 = 19,
284    #[doc = "Wing In Ground effect."]
285    AIS_TYPE_WIG = 20,
286    AIS_TYPE_WIG_HAZARDOUS_A = 21,
287    AIS_TYPE_WIG_HAZARDOUS_B = 22,
288    AIS_TYPE_WIG_HAZARDOUS_C = 23,
289    AIS_TYPE_WIG_HAZARDOUS_D = 24,
290    AIS_TYPE_WIG_RESERVED_1 = 25,
291    AIS_TYPE_WIG_RESERVED_2 = 26,
292    AIS_TYPE_WIG_RESERVED_3 = 27,
293    AIS_TYPE_WIG_RESERVED_4 = 28,
294    AIS_TYPE_WIG_RESERVED_5 = 29,
295    AIS_TYPE_FISHING = 30,
296    AIS_TYPE_TOWING = 31,
297    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
298    AIS_TYPE_TOWING_LARGE = 32,
299    #[doc = "Dredging or other underwater ops."]
300    AIS_TYPE_DREDGING = 33,
301    AIS_TYPE_DIVING = 34,
302    AIS_TYPE_MILITARY = 35,
303    AIS_TYPE_SAILING = 36,
304    AIS_TYPE_PLEASURE = 37,
305    AIS_TYPE_RESERVED_20 = 38,
306    AIS_TYPE_RESERVED_21 = 39,
307    #[doc = "High Speed Craft."]
308    AIS_TYPE_HSC = 40,
309    AIS_TYPE_HSC_HAZARDOUS_A = 41,
310    AIS_TYPE_HSC_HAZARDOUS_B = 42,
311    AIS_TYPE_HSC_HAZARDOUS_C = 43,
312    AIS_TYPE_HSC_HAZARDOUS_D = 44,
313    AIS_TYPE_HSC_RESERVED_1 = 45,
314    AIS_TYPE_HSC_RESERVED_2 = 46,
315    AIS_TYPE_HSC_RESERVED_3 = 47,
316    AIS_TYPE_HSC_RESERVED_4 = 48,
317    AIS_TYPE_HSC_UNKNOWN = 49,
318    AIS_TYPE_PILOT = 50,
319    #[doc = "Search And Rescue vessel."]
320    AIS_TYPE_SAR = 51,
321    AIS_TYPE_TUG = 52,
322    AIS_TYPE_PORT_TENDER = 53,
323    #[doc = "Anti-pollution equipment."]
324    AIS_TYPE_ANTI_POLLUTION = 54,
325    AIS_TYPE_LAW_ENFORCEMENT = 55,
326    AIS_TYPE_SPARE_LOCAL_1 = 56,
327    AIS_TYPE_SPARE_LOCAL_2 = 57,
328    AIS_TYPE_MEDICAL_TRANSPORT = 58,
329    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
330    AIS_TYPE_NONECOMBATANT = 59,
331    AIS_TYPE_PASSENGER = 60,
332    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
333    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
334    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
335    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
336    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
337    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
338    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
339    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
340    AIS_TYPE_PASSENGER_UNKNOWN = 69,
341    AIS_TYPE_CARGO = 70,
342    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
343    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
344    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
345    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
346    AIS_TYPE_CARGO_RESERVED_1 = 75,
347    AIS_TYPE_CARGO_RESERVED_2 = 76,
348    AIS_TYPE_CARGO_RESERVED_3 = 77,
349    AIS_TYPE_CARGO_RESERVED_4 = 78,
350    AIS_TYPE_CARGO_UNKNOWN = 79,
351    AIS_TYPE_TANKER = 80,
352    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
353    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
354    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
355    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
356    AIS_TYPE_TANKER_RESERVED_1 = 85,
357    AIS_TYPE_TANKER_RESERVED_2 = 86,
358    AIS_TYPE_TANKER_RESERVED_3 = 87,
359    AIS_TYPE_TANKER_RESERVED_4 = 88,
360    AIS_TYPE_TANKER_UNKNOWN = 89,
361    AIS_TYPE_OTHER = 90,
362    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
363    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
364    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
365    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
366    AIS_TYPE_OTHER_RESERVED_1 = 95,
367    AIS_TYPE_OTHER_RESERVED_2 = 96,
368    AIS_TYPE_OTHER_RESERVED_3 = 97,
369    AIS_TYPE_OTHER_RESERVED_4 = 98,
370    AIS_TYPE_OTHER_UNKNOWN = 99,
371}
372impl AisType {
373    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
374}
375impl Default for AisType {
376    fn default() -> Self {
377        Self::DEFAULT
378    }
379}
380bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
381impl AttitudeTargetTypemask {
382    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
383}
384impl Default for AttitudeTargetTypemask {
385    fn default() -> Self {
386        Self::DEFAULT
387    }
388}
389#[cfg_attr(feature = "ts", derive(TS))]
390#[cfg_attr(feature = "ts", ts(export))]
391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
393#[cfg_attr(feature = "serde", serde(tag = "type"))]
394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
395#[repr(u32)]
396#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
397pub enum AutotuneAxis {
398    #[doc = "Autotune roll axis."]
399    AUTOTUNE_AXIS_ROLL = 1,
400    #[doc = "Autotune pitch axis."]
401    AUTOTUNE_AXIS_PITCH = 2,
402    #[doc = "Autotune yaw axis."]
403    AUTOTUNE_AXIS_YAW = 4,
404}
405impl AutotuneAxis {
406    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
407}
408impl Default for AutotuneAxis {
409    fn default() -> Self {
410        Self::DEFAULT
411    }
412}
413bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
414impl CameraCapFlags {
415    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
416}
417impl Default for CameraCapFlags {
418    fn default() -> Self {
419        Self::DEFAULT
420    }
421}
422#[cfg_attr(feature = "ts", derive(TS))]
423#[cfg_attr(feature = "ts", ts(export))]
424#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
426#[cfg_attr(feature = "serde", serde(tag = "type"))]
427#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
428#[repr(u32)]
429#[doc = "Camera Modes."]
430pub enum CameraMode {
431    #[doc = "Camera is in image/photo capture mode."]
432    CAMERA_MODE_IMAGE = 0,
433    #[doc = "Camera is in video capture mode."]
434    CAMERA_MODE_VIDEO = 1,
435    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
436    CAMERA_MODE_IMAGE_SURVEY = 2,
437}
438impl CameraMode {
439    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
440}
441impl Default for CameraMode {
442    fn default() -> Self {
443        Self::DEFAULT
444    }
445}
446#[cfg_attr(feature = "ts", derive(TS))]
447#[cfg_attr(feature = "ts", ts(export))]
448#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
450#[cfg_attr(feature = "serde", serde(tag = "type"))]
451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
452#[repr(u32)]
453#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
454pub enum CameraSource {
455    #[doc = "Default camera source."]
456    CAMERA_SOURCE_DEFAULT = 0,
457    #[doc = "RGB camera source."]
458    CAMERA_SOURCE_RGB = 1,
459    #[doc = "IR camera source."]
460    CAMERA_SOURCE_IR = 2,
461    #[doc = "NDVI camera source."]
462    CAMERA_SOURCE_NDVI = 3,
463}
464impl CameraSource {
465    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
466}
467impl Default for CameraSource {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[cfg_attr(feature = "ts", derive(TS))]
473#[cfg_attr(feature = "ts", ts(export))]
474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
476#[cfg_attr(feature = "serde", serde(tag = "type"))]
477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
478#[repr(u32)]
479#[doc = "Camera tracking modes"]
480pub enum CameraTrackingMode {
481    #[doc = "Not tracking"]
482    CAMERA_TRACKING_MODE_NONE = 0,
483    #[doc = "Target is a point"]
484    CAMERA_TRACKING_MODE_POINT = 1,
485    #[doc = "Target is a rectangle"]
486    CAMERA_TRACKING_MODE_RECTANGLE = 2,
487}
488impl CameraTrackingMode {
489    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
490}
491impl Default for CameraTrackingMode {
492    fn default() -> Self {
493        Self::DEFAULT
494    }
495}
496#[cfg_attr(feature = "ts", derive(TS))]
497#[cfg_attr(feature = "ts", ts(export))]
498#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
500#[cfg_attr(feature = "serde", serde(tag = "type"))]
501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
502#[repr(u32)]
503#[doc = "Camera tracking status flags"]
504pub enum CameraTrackingStatusFlags {
505    #[doc = "Camera is not tracking"]
506    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
507    #[doc = "Camera is tracking"]
508    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
509    #[doc = "Camera tracking in error state"]
510    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
511}
512impl CameraTrackingStatusFlags {
513    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
514}
515impl Default for CameraTrackingStatusFlags {
516    fn default() -> Self {
517        Self::DEFAULT
518    }
519}
520bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
521impl CameraTrackingTargetData {
522    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
523}
524impl Default for CameraTrackingTargetData {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[cfg_attr(feature = "ts", derive(TS))]
530#[cfg_attr(feature = "ts", ts(export))]
531#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
533#[cfg_attr(feature = "serde", serde(tag = "type"))]
534#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
535#[repr(u32)]
536#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
537pub enum CameraZoomType {
538    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
539    ZOOM_TYPE_STEP = 0,
540    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
541    ZOOM_TYPE_CONTINUOUS = 1,
542    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
543    ZOOM_TYPE_RANGE = 2,
544    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
545    ZOOM_TYPE_FOCAL_LENGTH = 3,
546    #[doc = "Zoom value as horizontal field of view in degrees."]
547    ZOOM_TYPE_HORIZONTAL_FOV = 4,
548}
549impl CameraZoomType {
550    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
551}
552impl Default for CameraZoomType {
553    fn default() -> Self {
554        Self::DEFAULT
555    }
556}
557#[cfg_attr(feature = "ts", derive(TS))]
558#[cfg_attr(feature = "ts", ts(export))]
559#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
560#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
561#[cfg_attr(feature = "serde", serde(tag = "type"))]
562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
563#[repr(u32)]
564pub enum CanFilterOp {
565    CAN_FILTER_REPLACE = 0,
566    CAN_FILTER_ADD = 1,
567    CAN_FILTER_REMOVE = 2,
568}
569impl CanFilterOp {
570    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
571}
572impl Default for CanFilterOp {
573    fn default() -> Self {
574        Self::DEFAULT
575    }
576}
577#[cfg_attr(feature = "ts", derive(TS))]
578#[cfg_attr(feature = "ts", ts(export))]
579#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
581#[cfg_attr(feature = "serde", serde(tag = "type"))]
582#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
583#[repr(u32)]
584#[doc = "Possible responses from a CELLULAR_CONFIG message."]
585pub enum CellularConfigResponse {
586    #[doc = "Changes accepted."]
587    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
588    #[doc = "Invalid APN."]
589    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
590    #[doc = "Invalid PIN."]
591    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
592    #[doc = "Changes rejected."]
593    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
594    #[doc = "PUK is required to unblock SIM card."]
595    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
596}
597impl CellularConfigResponse {
598    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
599}
600impl Default for CellularConfigResponse {
601    fn default() -> Self {
602        Self::DEFAULT
603    }
604}
605#[cfg_attr(feature = "ts", derive(TS))]
606#[cfg_attr(feature = "ts", ts(export))]
607#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
608#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
609#[cfg_attr(feature = "serde", serde(tag = "type"))]
610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
611#[repr(u32)]
612#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
613pub enum CellularNetworkFailedReason {
614    #[doc = "No error"]
615    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
616    #[doc = "Error state is unknown"]
617    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
618    #[doc = "SIM is required for the modem but missing"]
619    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
620    #[doc = "SIM is available, but not usable for connection"]
621    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
622}
623impl CellularNetworkFailedReason {
624    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
625}
626impl Default for CellularNetworkFailedReason {
627    fn default() -> Self {
628        Self::DEFAULT
629    }
630}
631#[cfg_attr(feature = "ts", derive(TS))]
632#[cfg_attr(feature = "ts", ts(export))]
633#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
635#[cfg_attr(feature = "serde", serde(tag = "type"))]
636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
637#[repr(u32)]
638#[doc = "Cellular network radio type"]
639pub enum CellularNetworkRadioType {
640    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
641    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
642    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
643    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
644    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
645}
646impl CellularNetworkRadioType {
647    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
648}
649impl Default for CellularNetworkRadioType {
650    fn default() -> Self {
651        Self::DEFAULT
652    }
653}
654#[cfg_attr(feature = "ts", derive(TS))]
655#[cfg_attr(feature = "ts", ts(export))]
656#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
658#[cfg_attr(feature = "serde", serde(tag = "type"))]
659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
660#[repr(u32)]
661#[doc = "These flags encode the cellular network status"]
662pub enum CellularStatusFlag {
663    #[doc = "State unknown or not reportable."]
664    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
665    #[doc = "Modem is unusable"]
666    CELLULAR_STATUS_FLAG_FAILED = 1,
667    #[doc = "Modem is being initialized"]
668    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
669    #[doc = "Modem is locked"]
670    CELLULAR_STATUS_FLAG_LOCKED = 3,
671    #[doc = "Modem is not enabled and is powered down"]
672    CELLULAR_STATUS_FLAG_DISABLED = 4,
673    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
674    CELLULAR_STATUS_FLAG_DISABLING = 5,
675    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
676    CELLULAR_STATUS_FLAG_ENABLING = 6,
677    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
678    CELLULAR_STATUS_FLAG_ENABLED = 7,
679    #[doc = "Modem is searching for a network provider to register"]
680    CELLULAR_STATUS_FLAG_SEARCHING = 8,
681    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
682    CELLULAR_STATUS_FLAG_REGISTERED = 9,
683    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
684    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
685    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
686    CELLULAR_STATUS_FLAG_CONNECTING = 11,
687    #[doc = "One or more packet data bearers is active and connected"]
688    CELLULAR_STATUS_FLAG_CONNECTED = 12,
689}
690impl CellularStatusFlag {
691    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
692}
693impl Default for CellularStatusFlag {
694    fn default() -> Self {
695        Self::DEFAULT
696    }
697}
698#[cfg_attr(feature = "ts", derive(TS))]
699#[cfg_attr(feature = "ts", ts(export))]
700#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
702#[cfg_attr(feature = "serde", serde(tag = "type"))]
703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
704#[repr(u32)]
705#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
706pub enum CompMetadataType {
707    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
708    COMP_METADATA_TYPE_GENERAL = 0,
709    #[doc = "Parameter meta data."]
710    COMP_METADATA_TYPE_PARAMETER = 1,
711    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
712    COMP_METADATA_TYPE_COMMANDS = 2,
713    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
714    COMP_METADATA_TYPE_PERIPHERALS = 3,
715    #[doc = "Meta data for the events interface."]
716    COMP_METADATA_TYPE_EVENTS = 4,
717    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
718    COMP_METADATA_TYPE_ACTUATORS = 5,
719}
720impl CompMetadataType {
721    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
722}
723impl Default for CompMetadataType {
724    fn default() -> Self {
725        Self::DEFAULT
726    }
727}
728#[cfg_attr(feature = "ts", derive(TS))]
729#[cfg_attr(feature = "ts", ts(export))]
730#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
732#[cfg_attr(feature = "serde", serde(tag = "type"))]
733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
734#[repr(u32)]
735#[doc = "Indicates the ESC connection type."]
736pub enum EscConnectionType {
737    #[doc = "Traditional PPM ESC."]
738    ESC_CONNECTION_TYPE_PPM = 0,
739    #[doc = "Serial Bus connected ESC."]
740    ESC_CONNECTION_TYPE_SERIAL = 1,
741    #[doc = "One Shot PPM ESC."]
742    ESC_CONNECTION_TYPE_ONESHOT = 2,
743    #[doc = "I2C ESC."]
744    ESC_CONNECTION_TYPE_I2C = 3,
745    #[doc = "CAN-Bus ESC."]
746    ESC_CONNECTION_TYPE_CAN = 4,
747    #[doc = "DShot ESC."]
748    ESC_CONNECTION_TYPE_DSHOT = 5,
749}
750impl EscConnectionType {
751    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
752}
753impl Default for EscConnectionType {
754    fn default() -> Self {
755        Self::DEFAULT
756    }
757}
758bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
759impl EscFailureFlags {
760    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
761}
762impl Default for EscFailureFlags {
763    fn default() -> Self {
764        Self::DEFAULT
765    }
766}
767bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
768impl EstimatorStatusFlags {
769    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
770}
771impl Default for EstimatorStatusFlags {
772    fn default() -> Self {
773        Self::DEFAULT
774    }
775}
776#[cfg_attr(feature = "ts", derive(TS))]
777#[cfg_attr(feature = "ts", ts(export))]
778#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
780#[cfg_attr(feature = "serde", serde(tag = "type"))]
781#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
782#[repr(u32)]
783#[doc = "List of possible failure type to inject."]
784pub enum FailureType {
785    #[doc = "No failure injected, used to reset a previous failure."]
786    FAILURE_TYPE_OK = 0,
787    #[doc = "Sets unit off, so completely non-responsive."]
788    FAILURE_TYPE_OFF = 1,
789    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
790    FAILURE_TYPE_STUCK = 2,
791    #[doc = "Unit is reporting complete garbage."]
792    FAILURE_TYPE_GARBAGE = 3,
793    #[doc = "Unit is consistently wrong."]
794    FAILURE_TYPE_WRONG = 4,
795    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
796    FAILURE_TYPE_SLOW = 5,
797    #[doc = "Data of unit is delayed in time."]
798    FAILURE_TYPE_DELAYED = 6,
799    #[doc = "Unit is sometimes working, sometimes not."]
800    FAILURE_TYPE_INTERMITTENT = 7,
801}
802impl FailureType {
803    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
804}
805impl Default for FailureType {
806    fn default() -> Self {
807        Self::DEFAULT
808    }
809}
810#[cfg_attr(feature = "ts", derive(TS))]
811#[cfg_attr(feature = "ts", ts(export))]
812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
814#[cfg_attr(feature = "serde", serde(tag = "type"))]
815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
816#[repr(u32)]
817#[doc = "List of possible units where failures can be injected."]
818pub enum FailureUnit {
819    FAILURE_UNIT_SENSOR_GYRO = 0,
820    FAILURE_UNIT_SENSOR_ACCEL = 1,
821    FAILURE_UNIT_SENSOR_MAG = 2,
822    FAILURE_UNIT_SENSOR_BARO = 3,
823    FAILURE_UNIT_SENSOR_GPS = 4,
824    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
825    FAILURE_UNIT_SENSOR_VIO = 6,
826    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
827    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
828    FAILURE_UNIT_SYSTEM_BATTERY = 100,
829    FAILURE_UNIT_SYSTEM_MOTOR = 101,
830    FAILURE_UNIT_SYSTEM_SERVO = 102,
831    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
832    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
833    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
834}
835impl FailureUnit {
836    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
837}
838impl Default for FailureUnit {
839    fn default() -> Self {
840        Self::DEFAULT
841    }
842}
843#[cfg_attr(feature = "ts", derive(TS))]
844#[cfg_attr(feature = "ts", ts(export))]
845#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
846#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
847#[cfg_attr(feature = "serde", serde(tag = "type"))]
848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
849#[repr(u32)]
850pub enum FenceBreach {
851    #[doc = "No last fence breach"]
852    FENCE_BREACH_NONE = 0,
853    #[doc = "Breached minimum altitude"]
854    FENCE_BREACH_MINALT = 1,
855    #[doc = "Breached maximum altitude"]
856    FENCE_BREACH_MAXALT = 2,
857    #[doc = "Breached fence boundary"]
858    FENCE_BREACH_BOUNDARY = 3,
859}
860impl FenceBreach {
861    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
862}
863impl Default for FenceBreach {
864    fn default() -> Self {
865        Self::DEFAULT
866    }
867}
868#[cfg_attr(feature = "ts", derive(TS))]
869#[cfg_attr(feature = "ts", ts(export))]
870#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
872#[cfg_attr(feature = "serde", serde(tag = "type"))]
873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
874#[repr(u32)]
875#[doc = "Actions being taken to mitigate/prevent fence breach"]
876pub enum FenceMitigate {
877    #[doc = "Unknown"]
878    FENCE_MITIGATE_UNKNOWN = 0,
879    #[doc = "No actions being taken"]
880    FENCE_MITIGATE_NONE = 1,
881    #[doc = "Velocity limiting active to prevent breach"]
882    FENCE_MITIGATE_VEL_LIMIT = 2,
883}
884impl FenceMitigate {
885    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
886}
887impl Default for FenceMitigate {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892#[cfg_attr(feature = "ts", derive(TS))]
893#[cfg_attr(feature = "ts", ts(export))]
894#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
895#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
896#[cfg_attr(feature = "serde", serde(tag = "type"))]
897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
898#[repr(u32)]
899#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
900pub enum FenceType {
901    #[doc = "Maximum altitude fence"]
902    FENCE_TYPE_ALT_MAX = 1,
903    #[doc = "Circle fence"]
904    FENCE_TYPE_CIRCLE = 2,
905    #[doc = "Polygon fence"]
906    FENCE_TYPE_POLYGON = 4,
907    #[doc = "Minimum altitude fence"]
908    FENCE_TYPE_ALT_MIN = 8,
909}
910impl FenceType {
911    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
912}
913impl Default for FenceType {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918#[cfg_attr(feature = "ts", derive(TS))]
919#[cfg_attr(feature = "ts", ts(export))]
920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
922#[cfg_attr(feature = "serde", serde(tag = "type"))]
923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
924#[repr(u32)]
925#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
926pub enum FirmwareVersionType {
927    #[doc = "development release"]
928    FIRMWARE_VERSION_TYPE_DEV = 0,
929    #[doc = "alpha release"]
930    FIRMWARE_VERSION_TYPE_ALPHA = 64,
931    #[doc = "beta release"]
932    FIRMWARE_VERSION_TYPE_BETA = 128,
933    #[doc = "release candidate"]
934    FIRMWARE_VERSION_TYPE_RC = 192,
935    #[doc = "official stable release"]
936    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
937}
938impl FirmwareVersionType {
939    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
940}
941impl Default for FirmwareVersionType {
942    fn default() -> Self {
943        Self::DEFAULT
944    }
945}
946bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
947impl GimbalDeviceCapFlags {
948    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
949}
950impl Default for GimbalDeviceCapFlags {
951    fn default() -> Self {
952        Self::DEFAULT
953    }
954}
955bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
956impl GimbalDeviceErrorFlags {
957    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
958}
959impl Default for GimbalDeviceErrorFlags {
960    fn default() -> Self {
961        Self::DEFAULT
962    }
963}
964bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
965impl GimbalDeviceFlags {
966    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
967}
968impl Default for GimbalDeviceFlags {
969    fn default() -> Self {
970        Self::DEFAULT
971    }
972}
973bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
974impl GimbalManagerCapFlags {
975    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
976}
977impl Default for GimbalManagerCapFlags {
978    fn default() -> Self {
979        Self::DEFAULT
980    }
981}
982bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
983impl GimbalManagerFlags {
984    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
985}
986impl Default for GimbalManagerFlags {
987    fn default() -> Self {
988        Self::DEFAULT
989    }
990}
991#[cfg_attr(feature = "ts", derive(TS))]
992#[cfg_attr(feature = "ts", ts(export))]
993#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
995#[cfg_attr(feature = "serde", serde(tag = "type"))]
996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
997#[repr(u32)]
998#[doc = "Type of GPS fix"]
999pub enum GpsFixType {
1000    #[doc = "No GPS connected"]
1001    GPS_FIX_TYPE_NO_GPS = 0,
1002    #[doc = "No position information, GPS is connected"]
1003    GPS_FIX_TYPE_NO_FIX = 1,
1004    #[doc = "2D position"]
1005    GPS_FIX_TYPE_2D_FIX = 2,
1006    #[doc = "3D position"]
1007    GPS_FIX_TYPE_3D_FIX = 3,
1008    #[doc = "DGPS/SBAS aided 3D position"]
1009    GPS_FIX_TYPE_DGPS = 4,
1010    #[doc = "RTK float, 3D position"]
1011    GPS_FIX_TYPE_RTK_FLOAT = 5,
1012    #[doc = "RTK Fixed, 3D position"]
1013    GPS_FIX_TYPE_RTK_FIXED = 6,
1014    #[doc = "Static fixed, typically used for base stations"]
1015    GPS_FIX_TYPE_STATIC = 7,
1016    #[doc = "PPP, 3D position."]
1017    GPS_FIX_TYPE_PPP = 8,
1018}
1019impl GpsFixType {
1020    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1021}
1022impl Default for GpsFixType {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1028impl GpsInputIgnoreFlags {
1029    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1030}
1031impl Default for GpsInputIgnoreFlags {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036#[cfg_attr(feature = "ts", derive(TS))]
1037#[cfg_attr(feature = "ts", ts(export))]
1038#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1039#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1040#[cfg_attr(feature = "serde", serde(tag = "type"))]
1041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1042#[repr(u32)]
1043#[doc = "Gripper actions."]
1044pub enum GripperActions {
1045    #[doc = "Gripper release cargo."]
1046    GRIPPER_ACTION_RELEASE = 0,
1047    #[doc = "Gripper grab onto cargo."]
1048    GRIPPER_ACTION_GRAB = 1,
1049}
1050impl GripperActions {
1051    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1052}
1053impl Default for GripperActions {
1054    fn default() -> Self {
1055        Self::DEFAULT
1056    }
1057}
1058bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1059impl HighresImuUpdatedFlags {
1060    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1061}
1062impl Default for HighresImuUpdatedFlags {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1068impl HilActuatorControlsFlags {
1069    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1070}
1071impl Default for HilActuatorControlsFlags {
1072    fn default() -> Self {
1073        Self::DEFAULT
1074    }
1075}
1076bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1077impl HilSensorUpdatedFlags {
1078    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1079}
1080impl Default for HilSensorUpdatedFlags {
1081    fn default() -> Self {
1082        Self::DEFAULT
1083    }
1084}
1085bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1086impl HlFailureFlag {
1087    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1088}
1089impl Default for HlFailureFlag {
1090    fn default() -> Self {
1091        Self::DEFAULT
1092    }
1093}
1094bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1095impl IlluminatorErrorFlags {
1096    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1097}
1098impl Default for IlluminatorErrorFlags {
1099    fn default() -> Self {
1100        Self::DEFAULT
1101    }
1102}
1103#[cfg_attr(feature = "ts", derive(TS))]
1104#[cfg_attr(feature = "ts", ts(export))]
1105#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1106#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1107#[cfg_attr(feature = "serde", serde(tag = "type"))]
1108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1109#[repr(u32)]
1110#[doc = "Modes of illuminator"]
1111pub enum IlluminatorMode {
1112    #[doc = "Illuminator mode is not specified/unknown"]
1113    ILLUMINATOR_MODE_UNKNOWN = 0,
1114    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1115    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1116    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1117    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1118}
1119impl IlluminatorMode {
1120    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1121}
1122impl Default for IlluminatorMode {
1123    fn default() -> Self {
1124        Self::DEFAULT
1125    }
1126}
1127#[cfg_attr(feature = "ts", derive(TS))]
1128#[cfg_attr(feature = "ts", ts(export))]
1129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1131#[cfg_attr(feature = "serde", serde(tag = "type"))]
1132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1133#[repr(u32)]
1134#[doc = "Type of landing target"]
1135pub enum LandingTargetType {
1136    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1137    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1138    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1139    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1140    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1141    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1142    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1143    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1144}
1145impl LandingTargetType {
1146    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1147}
1148impl Default for LandingTargetType {
1149    fn default() -> Self {
1150        Self::DEFAULT
1151    }
1152}
1153#[cfg_attr(feature = "ts", derive(TS))]
1154#[cfg_attr(feature = "ts", ts(export))]
1155#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "serde", serde(tag = "type"))]
1158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1159#[repr(u32)]
1160pub enum MagCalStatus {
1161    MAG_CAL_NOT_STARTED = 0,
1162    MAG_CAL_WAITING_TO_START = 1,
1163    MAG_CAL_RUNNING_STEP_ONE = 2,
1164    MAG_CAL_RUNNING_STEP_TWO = 3,
1165    MAG_CAL_SUCCESS = 4,
1166    MAG_CAL_FAILED = 5,
1167    MAG_CAL_BAD_ORIENTATION = 6,
1168    MAG_CAL_BAD_RADIUS = 7,
1169}
1170impl MagCalStatus {
1171    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1172}
1173impl Default for MagCalStatus {
1174    fn default() -> Self {
1175        Self::DEFAULT
1176    }
1177}
1178#[cfg_attr(feature = "ts", derive(TS))]
1179#[cfg_attr(feature = "ts", ts(export))]
1180#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1182#[cfg_attr(feature = "serde", serde(tag = "type"))]
1183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1184#[repr(u32)]
1185pub enum MavArmAuthDeniedReason {
1186    #[doc = "Not a specific reason"]
1187    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1188    #[doc = "Authorizer will send the error as string to GCS"]
1189    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1190    #[doc = "At least one waypoint have a invalid value"]
1191    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1192    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1193    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1194    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1195    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1196    #[doc = "Weather is not good to fly"]
1197    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1198}
1199impl MavArmAuthDeniedReason {
1200    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1201}
1202impl Default for MavArmAuthDeniedReason {
1203    fn default() -> Self {
1204        Self::DEFAULT
1205    }
1206}
1207#[cfg_attr(feature = "ts", derive(TS))]
1208#[cfg_attr(feature = "ts", ts(export))]
1209#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1211#[cfg_attr(feature = "serde", serde(tag = "type"))]
1212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1213#[repr(u32)]
1214#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1215pub enum MavAutopilot {
1216    #[doc = "Generic autopilot, full support for everything"]
1217    MAV_AUTOPILOT_GENERIC = 0,
1218    #[doc = "Reserved for future use."]
1219    MAV_AUTOPILOT_RESERVED = 1,
1220    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1221    MAV_AUTOPILOT_SLUGS = 2,
1222    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1223    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1224    #[doc = "OpenPilot, <http://openpilot.org>"]
1225    MAV_AUTOPILOT_OPENPILOT = 4,
1226    #[doc = "Generic autopilot only supporting simple waypoints"]
1227    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1228    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1229    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1230    #[doc = "Generic autopilot supporting the full mission command set"]
1231    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1232    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1233    MAV_AUTOPILOT_INVALID = 8,
1234    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1235    MAV_AUTOPILOT_PPZ = 9,
1236    #[doc = "UAV Dev Board"]
1237    MAV_AUTOPILOT_UDB = 10,
1238    #[doc = "FlexiPilot"]
1239    MAV_AUTOPILOT_FP = 11,
1240    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1241    MAV_AUTOPILOT_PX4 = 12,
1242    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1243    MAV_AUTOPILOT_SMACCMPILOT = 13,
1244    #[doc = "AutoQuad -- <http://autoquad.org>"]
1245    MAV_AUTOPILOT_AUTOQUAD = 14,
1246    #[doc = "Armazila -- <http://armazila.com>"]
1247    MAV_AUTOPILOT_ARMAZILA = 15,
1248    #[doc = "Aerob -- <http://aerob.ru>"]
1249    MAV_AUTOPILOT_AEROB = 16,
1250    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1251    MAV_AUTOPILOT_ASLUAV = 17,
1252    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1253    MAV_AUTOPILOT_SMARTAP = 18,
1254    #[doc = "AirRails - <http://uaventure.com>"]
1255    MAV_AUTOPILOT_AIRRAILS = 19,
1256    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1257    MAV_AUTOPILOT_REFLEX = 20,
1258}
1259impl MavAutopilot {
1260    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1261}
1262impl Default for MavAutopilot {
1263    fn default() -> Self {
1264        Self::DEFAULT
1265    }
1266}
1267#[cfg_attr(feature = "ts", derive(TS))]
1268#[cfg_attr(feature = "ts", ts(export))]
1269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1271#[cfg_attr(feature = "serde", serde(tag = "type"))]
1272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1273#[repr(u32)]
1274#[doc = "Enumeration for battery charge states."]
1275pub enum MavBatteryChargeState {
1276    #[doc = "Low battery state is not provided"]
1277    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1278    #[doc = "Battery is not in low state. Normal operation."]
1279    MAV_BATTERY_CHARGE_STATE_OK = 1,
1280    #[doc = "Battery state is low, warn and monitor close."]
1281    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1282    #[doc = "Battery state is critical, return or abort immediately."]
1283    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1284    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1285    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1286    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1287    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1288    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1289    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1290    #[doc = "Battery is charging."]
1291    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1292}
1293impl MavBatteryChargeState {
1294    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1295}
1296impl Default for MavBatteryChargeState {
1297    fn default() -> Self {
1298        Self::DEFAULT
1299    }
1300}
1301bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1302impl MavBatteryFault {
1303    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1304}
1305impl Default for MavBatteryFault {
1306    fn default() -> Self {
1307        Self::DEFAULT
1308    }
1309}
1310#[cfg_attr(feature = "ts", derive(TS))]
1311#[cfg_attr(feature = "ts", ts(export))]
1312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1314#[cfg_attr(feature = "serde", serde(tag = "type"))]
1315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1316#[repr(u32)]
1317#[doc = "Enumeration of battery functions"]
1318pub enum MavBatteryFunction {
1319    #[doc = "Battery function is unknown"]
1320    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1321    #[doc = "Battery supports all flight systems"]
1322    MAV_BATTERY_FUNCTION_ALL = 1,
1323    #[doc = "Battery for the propulsion system"]
1324    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1325    #[doc = "Avionics battery"]
1326    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1327    #[doc = "Payload battery"]
1328    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1329}
1330impl MavBatteryFunction {
1331    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1332}
1333impl Default for MavBatteryFunction {
1334    fn default() -> Self {
1335        Self::DEFAULT
1336    }
1337}
1338#[cfg_attr(feature = "ts", derive(TS))]
1339#[cfg_attr(feature = "ts", ts(export))]
1340#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1342#[cfg_attr(feature = "serde", serde(tag = "type"))]
1343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1344#[repr(u32)]
1345#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1346pub enum MavBatteryMode {
1347    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1348    MAV_BATTERY_MODE_UNKNOWN = 0,
1349    #[doc = "Battery is auto discharging (towards storage level)."]
1350    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1351    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1352    MAV_BATTERY_MODE_HOT_SWAP = 2,
1353}
1354impl MavBatteryMode {
1355    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1356}
1357impl Default for MavBatteryMode {
1358    fn default() -> Self {
1359        Self::DEFAULT
1360    }
1361}
1362#[cfg_attr(feature = "ts", derive(TS))]
1363#[cfg_attr(feature = "ts", ts(export))]
1364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1366#[cfg_attr(feature = "serde", serde(tag = "type"))]
1367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1368#[repr(u32)]
1369#[doc = "Enumeration of battery types"]
1370pub enum MavBatteryType {
1371    #[doc = "Not specified."]
1372    MAV_BATTERY_TYPE_UNKNOWN = 0,
1373    #[doc = "Lithium polymer battery"]
1374    MAV_BATTERY_TYPE_LIPO = 1,
1375    #[doc = "Lithium-iron-phosphate battery"]
1376    MAV_BATTERY_TYPE_LIFE = 2,
1377    #[doc = "Lithium-ION battery"]
1378    MAV_BATTERY_TYPE_LION = 3,
1379    #[doc = "Nickel metal hydride battery"]
1380    MAV_BATTERY_TYPE_NIMH = 4,
1381}
1382impl MavBatteryType {
1383    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1384}
1385impl Default for MavBatteryType {
1386    fn default() -> Self {
1387        Self::DEFAULT
1388    }
1389}
1390#[cfg_attr(feature = "ts", derive(TS))]
1391#[cfg_attr(feature = "ts", ts(export))]
1392#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1394#[cfg_attr(feature = "serde", serde(tag = "type"))]
1395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1396#[repr(u32)]
1397#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1398pub enum MavCmd {
1399    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1400    MAV_CMD_NAV_WAYPOINT = 16,
1401    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1402    MAV_CMD_NAV_LOITER_UNLIM = 17,
1403    #[doc = "Loiter around this waypoint for X turns"]
1404    MAV_CMD_NAV_LOITER_TURNS = 18,
1405    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1406    MAV_CMD_NAV_LOITER_TIME = 19,
1407    #[doc = "Return to launch location"]
1408    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1409    #[doc = "Land at location."]
1410    MAV_CMD_NAV_LAND = 21,
1411    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1412    MAV_CMD_NAV_TAKEOFF = 22,
1413    #[doc = "Land at local position (local frame only)"]
1414    MAV_CMD_NAV_LAND_LOCAL = 23,
1415    #[doc = "Takeoff from local position (local frame only)"]
1416    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1417    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1418    MAV_CMD_NAV_FOLLOW = 25,
1419    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1420    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1421    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1422    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1423    #[doc = "Begin following a target"]
1424    MAV_CMD_DO_FOLLOW = 32,
1425    #[doc = "Reposition the MAV after a follow target command has been sent"]
1426    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1427    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1428    MAV_CMD_DO_ORBIT = 34,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_NAV_ROI = 80,
1432    #[doc = "Control autonomous path planning on the MAV."]
1433    MAV_CMD_NAV_PATHPLANNING = 81,
1434    #[doc = "Navigate to waypoint using a spline path."]
1435    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1436    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1437    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1438    #[doc = "Land using VTOL mode"]
1439    MAV_CMD_NAV_VTOL_LAND = 85,
1440    #[doc = "hand control over to an external controller"]
1441    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1442    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1443    MAV_CMD_NAV_DELAY = 93,
1444    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1445    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1446    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1447    MAV_CMD_NAV_LAST = 95,
1448    #[doc = "Delay mission state machine."]
1449    MAV_CMD_CONDITION_DELAY = 112,
1450    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1451    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1452    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1453    MAV_CMD_CONDITION_DISTANCE = 114,
1454    #[doc = "Reach a certain target angle."]
1455    MAV_CMD_CONDITION_YAW = 115,
1456    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1457    MAV_CMD_CONDITION_LAST = 159,
1458    #[doc = "Set system mode."]
1459    MAV_CMD_DO_SET_MODE = 176,
1460    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1461    MAV_CMD_DO_JUMP = 177,
1462    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1463    MAV_CMD_DO_CHANGE_SPEED = 178,
1464    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1465    MAV_CMD_DO_SET_HOME = 179,
1466    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1467    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1468    MAV_CMD_DO_SET_PARAMETER = 180,
1469    #[doc = "Set a relay to a condition."]
1470    MAV_CMD_DO_SET_RELAY = 181,
1471    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1472    MAV_CMD_DO_REPEAT_RELAY = 182,
1473    #[doc = "Set a servo to a desired PWM value."]
1474    MAV_CMD_DO_SET_SERVO = 183,
1475    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1476    MAV_CMD_DO_REPEAT_SERVO = 184,
1477    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1478    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1479    #[doc = "Change altitude set point."]
1480    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1481    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1482    MAV_CMD_DO_SET_ACTUATOR = 187,
1483    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1484    MAV_CMD_DO_RETURN_PATH_START = 188,
1485    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1486    MAV_CMD_DO_LAND_START = 189,
1487    #[doc = "Mission command to perform a landing from a rally point."]
1488    MAV_CMD_DO_RALLY_LAND = 190,
1489    #[doc = "Mission command to safely abort an autonomous landing."]
1490    MAV_CMD_DO_GO_AROUND = 191,
1491    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1492    MAV_CMD_DO_REPOSITION = 192,
1493    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1494    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1495    #[doc = "Set moving direction to forward or reverse."]
1496    MAV_CMD_DO_SET_REVERSE = 194,
1497    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1498    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1499    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1500    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1501    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1502    MAV_CMD_DO_SET_ROI_NONE = 197,
1503    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1504    MAV_CMD_DO_SET_ROI_SYSID = 198,
1505    #[doc = "Control onboard camera system."]
1506    MAV_CMD_DO_CONTROL_VIDEO = 200,
1507    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1508    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1509    MAV_CMD_DO_SET_ROI = 201,
1510    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1511    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1512    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1513    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1514    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1515    #[doc = "Mission command to configure a camera or antenna mount"]
1516    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1517    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1518    #[doc = "Mission command to control a camera or antenna mount"]
1519    MAV_CMD_DO_MOUNT_CONTROL = 205,
1520    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1521    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1522    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1523    MAV_CMD_DO_FENCE_ENABLE = 207,
1524    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1525    MAV_CMD_DO_PARACHUTE = 208,
1526    #[doc = "Command to perform motor test."]
1527    MAV_CMD_DO_MOTOR_TEST = 209,
1528    #[doc = "Change to/from inverted flight."]
1529    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1530    #[doc = "Mission command to operate a gripper."]
1531    MAV_CMD_DO_GRIPPER = 211,
1532    #[doc = "Enable/disable autotune."]
1533    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1534    #[doc = "Sets a desired vehicle turn angle and speed change."]
1535    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1536    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1537    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1538    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1539    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1540    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1541    #[doc = "set id of master controller"]
1542    MAV_CMD_DO_GUIDED_MASTER = 221,
1543    #[doc = "Set limits for external control"]
1544    MAV_CMD_DO_GUIDED_LIMITS = 222,
1545    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1546    MAV_CMD_DO_ENGINE_CONTROL = 223,
1547    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1548    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1549    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1550    MAV_CMD_DO_LAST = 240,
1551    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1552    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1553    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1554    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1555    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1556    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1557    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1558    MAV_CMD_PREFLIGHT_STORAGE = 245,
1559    #[doc = "Request the reboot or shutdown of system components."]
1560    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1561    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1562    MAV_CMD_OVERRIDE_GOTO = 252,
1563    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1564    MAV_CMD_OBLIQUE_SURVEY = 260,
1565    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1566    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1567    #[doc = "start running a mission"]
1568    MAV_CMD_MISSION_START = 300,
1569    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1570    MAV_CMD_ACTUATOR_TEST = 310,
1571    #[doc = "Actuator configuration command."]
1572    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1573    #[doc = "Arms / Disarms a component"]
1574    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1575    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1576    MAV_CMD_RUN_PREARM_CHECKS = 401,
1577    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1578    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1579    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1580    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1581    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1582    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1583    MAV_CMD_GET_HOME_POSITION = 410,
1584    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1585    MAV_CMD_INJECT_FAILURE = 420,
1586    #[doc = "Starts receiver pairing."]
1587    MAV_CMD_START_RX_PAIR = 500,
1588    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1589    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1590    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1591    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1592    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1593    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1594    MAV_CMD_REQUEST_MESSAGE = 512,
1595    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1596    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1597    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1598    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1599    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1600    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1601    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1602    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1603    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1604    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1605    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1606    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1607    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1608    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1609    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1610    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1611    MAV_CMD_STORAGE_FORMAT = 526,
1612    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1613    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1614    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1615    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1616    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1617    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1618    #[doc = "Reset all camera settings to Factory Default"]
1619    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1620    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1621    MAV_CMD_SET_CAMERA_MODE = 530,
1622    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1623    MAV_CMD_SET_CAMERA_ZOOM = 531,
1624    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1625    MAV_CMD_SET_CAMERA_FOCUS = 532,
1626    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1627    MAV_CMD_SET_STORAGE_USAGE = 533,
1628    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1629    MAV_CMD_SET_CAMERA_SOURCE = 534,
1630    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1631    MAV_CMD_JUMP_TAG = 600,
1632    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1633    MAV_CMD_DO_JUMP_TAG = 601,
1634    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1635    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1636    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1637    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1638    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1639    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1640    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1641    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1642    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1643    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1644    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1645    #[doc = "Enable or disable on-board camera triggering system."]
1646    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1647    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1648    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1649    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1650    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1651    #[doc = "Stops ongoing tracking."]
1652    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1653    #[doc = "Starts video capture (recording)."]
1654    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1655    #[doc = "Stop the current video capture (recording)."]
1656    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1657    #[doc = "Start video streaming"]
1658    MAV_CMD_VIDEO_START_STREAMING = 2502,
1659    #[doc = "Stop the given video stream"]
1660    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1661    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1662    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1663    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1664    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1665    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1666    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1667    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1668    MAV_CMD_LOGGING_START = 2510,
1669    #[doc = "Request to stop streaming log data over MAVLink"]
1670    MAV_CMD_LOGGING_STOP = 2511,
1671    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1672    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1673    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1674    #[doc = "Create a panorama at the current position"]
1675    MAV_CMD_PANORAMA_CREATE = 2800,
1676    #[doc = "Request VTOL transition"]
1677    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1678    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1679    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1680    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1681    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1682    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1683    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1684    #[doc = "Delay mission state machine until gate has been reached."]
1685    MAV_CMD_CONDITION_GATE = 4501,
1686    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1687    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1688    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1689    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1690    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1691    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1692    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1693    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1694    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1695    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1696    #[doc = "Rally point. You can have multiple rally points defined."]
1697    MAV_CMD_NAV_RALLY_POINT = 5100,
1698    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1699    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1700    #[doc = "Change state of safety switch."]
1701    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1702    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1703    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1704    #[deprecated = "  (Deprecated since 2021-06)"]
1705    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1706    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1707    #[deprecated = "  (Deprecated since 2021-06)"]
1708    #[doc = "Control the payload deployment."]
1709    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1710    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1711    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1712    #[doc = "Command to operate winch."]
1713    MAV_CMD_DO_WINCH = 42600,
1714    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1715    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1716    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1717    MAV_CMD_WAYPOINT_USER_1 = 31000,
1718    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1719    MAV_CMD_WAYPOINT_USER_2 = 31001,
1720    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1721    MAV_CMD_WAYPOINT_USER_3 = 31002,
1722    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1723    MAV_CMD_WAYPOINT_USER_4 = 31003,
1724    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1725    MAV_CMD_WAYPOINT_USER_5 = 31004,
1726    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1727    MAV_CMD_SPATIAL_USER_1 = 31005,
1728    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1729    MAV_CMD_SPATIAL_USER_2 = 31006,
1730    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1731    MAV_CMD_SPATIAL_USER_3 = 31007,
1732    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1733    MAV_CMD_SPATIAL_USER_4 = 31008,
1734    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1735    MAV_CMD_SPATIAL_USER_5 = 31009,
1736    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1737    MAV_CMD_USER_1 = 31010,
1738    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1739    MAV_CMD_USER_2 = 31011,
1740    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1741    MAV_CMD_USER_3 = 31012,
1742    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1743    MAV_CMD_USER_4 = 31013,
1744    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1745    MAV_CMD_USER_5 = 31014,
1746    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1747    MAV_CMD_CAN_FORWARD = 32000,
1748}
1749impl MavCmd {
1750    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1751}
1752impl Default for MavCmd {
1753    fn default() -> Self {
1754        Self::DEFAULT
1755    }
1756}
1757#[cfg_attr(feature = "ts", derive(TS))]
1758#[cfg_attr(feature = "ts", ts(export))]
1759#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1761#[cfg_attr(feature = "serde", serde(tag = "type"))]
1762#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1763#[repr(u32)]
1764#[doc = "Possible actions an aircraft can take to avoid a collision."]
1765pub enum MavCollisionAction {
1766    #[doc = "Ignore any potential collisions"]
1767    MAV_COLLISION_ACTION_NONE = 0,
1768    #[doc = "Report potential collision"]
1769    MAV_COLLISION_ACTION_REPORT = 1,
1770    #[doc = "Ascend or Descend to avoid threat"]
1771    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1772    #[doc = "Move horizontally to avoid threat"]
1773    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1774    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1775    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1776    #[doc = "Aircraft to fly directly back to its launch point"]
1777    MAV_COLLISION_ACTION_RTL = 5,
1778    #[doc = "Aircraft to stop in place"]
1779    MAV_COLLISION_ACTION_HOVER = 6,
1780}
1781impl MavCollisionAction {
1782    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1783}
1784impl Default for MavCollisionAction {
1785    fn default() -> Self {
1786        Self::DEFAULT
1787    }
1788}
1789#[cfg_attr(feature = "ts", derive(TS))]
1790#[cfg_attr(feature = "ts", ts(export))]
1791#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1793#[cfg_attr(feature = "serde", serde(tag = "type"))]
1794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1795#[repr(u32)]
1796#[doc = "Source of information about this collision."]
1797pub enum MavCollisionSrc {
1798    #[doc = "ID field references ADSB_VEHICLE packets"]
1799    MAV_COLLISION_SRC_ADSB = 0,
1800    #[doc = "ID field references MAVLink SRC ID"]
1801    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1802}
1803impl MavCollisionSrc {
1804    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1805}
1806impl Default for MavCollisionSrc {
1807    fn default() -> Self {
1808        Self::DEFAULT
1809    }
1810}
1811#[cfg_attr(feature = "ts", derive(TS))]
1812#[cfg_attr(feature = "ts", ts(export))]
1813#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1815#[cfg_attr(feature = "serde", serde(tag = "type"))]
1816#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1817#[repr(u32)]
1818#[doc = "Aircraft-rated danger from this threat."]
1819pub enum MavCollisionThreatLevel {
1820    #[doc = "Not a threat"]
1821    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1822    #[doc = "Craft is mildly concerned about this threat"]
1823    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1824    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1825    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1826}
1827impl MavCollisionThreatLevel {
1828    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1829}
1830impl Default for MavCollisionThreatLevel {
1831    fn default() -> Self {
1832        Self::DEFAULT
1833    }
1834}
1835#[cfg_attr(feature = "ts", derive(TS))]
1836#[cfg_attr(feature = "ts", ts(export))]
1837#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1838#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1839#[cfg_attr(feature = "serde", serde(tag = "type"))]
1840#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1841#[repr(u32)]
1842#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1843pub enum MavComponent {
1844    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1845    MAV_COMP_ID_ALL = 0,
1846    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1847    MAV_COMP_ID_AUTOPILOT1 = 1,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER1 = 25,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER2 = 26,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER3 = 27,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER4 = 28,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER5 = 29,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER6 = 30,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER7 = 31,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER8 = 32,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER9 = 33,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER10 = 34,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER11 = 35,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER12 = 36,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER13 = 37,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER14 = 38,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER15 = 39,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER16 = 40,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER17 = 41,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER18 = 42,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER19 = 43,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER20 = 44,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER21 = 45,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER22 = 46,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER23 = 47,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER24 = 48,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER25 = 49,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER26 = 50,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER27 = 51,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER28 = 52,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER29 = 53,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER30 = 54,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER31 = 55,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER32 = 56,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER33 = 57,
1914    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1915    MAV_COMP_ID_USER34 = 58,
1916    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1917    MAV_COMP_ID_USER35 = 59,
1918    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1919    MAV_COMP_ID_USER36 = 60,
1920    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1921    MAV_COMP_ID_USER37 = 61,
1922    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1923    MAV_COMP_ID_USER38 = 62,
1924    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1925    MAV_COMP_ID_USER39 = 63,
1926    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1927    MAV_COMP_ID_USER40 = 64,
1928    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1929    MAV_COMP_ID_USER41 = 65,
1930    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1931    MAV_COMP_ID_USER42 = 66,
1932    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1933    MAV_COMP_ID_USER43 = 67,
1934    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1935    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1936    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1937    MAV_COMP_ID_USER45 = 69,
1938    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1939    MAV_COMP_ID_USER46 = 70,
1940    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1941    MAV_COMP_ID_USER47 = 71,
1942    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1943    MAV_COMP_ID_USER48 = 72,
1944    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1945    MAV_COMP_ID_USER49 = 73,
1946    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1947    MAV_COMP_ID_USER50 = 74,
1948    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1949    MAV_COMP_ID_USER51 = 75,
1950    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1951    MAV_COMP_ID_USER52 = 76,
1952    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1953    MAV_COMP_ID_USER53 = 77,
1954    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1955    MAV_COMP_ID_USER54 = 78,
1956    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1957    MAV_COMP_ID_USER55 = 79,
1958    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1959    MAV_COMP_ID_USER56 = 80,
1960    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1961    MAV_COMP_ID_USER57 = 81,
1962    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1963    MAV_COMP_ID_USER58 = 82,
1964    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1965    MAV_COMP_ID_USER59 = 83,
1966    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1967    MAV_COMP_ID_USER60 = 84,
1968    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1969    MAV_COMP_ID_USER61 = 85,
1970    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1971    MAV_COMP_ID_USER62 = 86,
1972    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1973    MAV_COMP_ID_USER63 = 87,
1974    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1975    MAV_COMP_ID_USER64 = 88,
1976    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1977    MAV_COMP_ID_USER65 = 89,
1978    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1979    MAV_COMP_ID_USER66 = 90,
1980    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1981    MAV_COMP_ID_USER67 = 91,
1982    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1983    MAV_COMP_ID_USER68 = 92,
1984    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1985    MAV_COMP_ID_USER69 = 93,
1986    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1987    MAV_COMP_ID_USER70 = 94,
1988    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1989    MAV_COMP_ID_USER71 = 95,
1990    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1991    MAV_COMP_ID_USER72 = 96,
1992    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1993    MAV_COMP_ID_USER73 = 97,
1994    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1995    MAV_COMP_ID_USER74 = 98,
1996    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1997    MAV_COMP_ID_USER75 = 99,
1998    #[doc = "Camera #1."]
1999    MAV_COMP_ID_CAMERA = 100,
2000    #[doc = "Camera #2."]
2001    MAV_COMP_ID_CAMERA2 = 101,
2002    #[doc = "Camera #3."]
2003    MAV_COMP_ID_CAMERA3 = 102,
2004    #[doc = "Camera #4."]
2005    MAV_COMP_ID_CAMERA4 = 103,
2006    #[doc = "Camera #5."]
2007    MAV_COMP_ID_CAMERA5 = 104,
2008    #[doc = "Camera #6."]
2009    MAV_COMP_ID_CAMERA6 = 105,
2010    #[doc = "Servo #1."]
2011    MAV_COMP_ID_SERVO1 = 140,
2012    #[doc = "Servo #2."]
2013    MAV_COMP_ID_SERVO2 = 141,
2014    #[doc = "Servo #3."]
2015    MAV_COMP_ID_SERVO3 = 142,
2016    #[doc = "Servo #4."]
2017    MAV_COMP_ID_SERVO4 = 143,
2018    #[doc = "Servo #5."]
2019    MAV_COMP_ID_SERVO5 = 144,
2020    #[doc = "Servo #6."]
2021    MAV_COMP_ID_SERVO6 = 145,
2022    #[doc = "Servo #7."]
2023    MAV_COMP_ID_SERVO7 = 146,
2024    #[doc = "Servo #8."]
2025    MAV_COMP_ID_SERVO8 = 147,
2026    #[doc = "Servo #9."]
2027    MAV_COMP_ID_SERVO9 = 148,
2028    #[doc = "Servo #10."]
2029    MAV_COMP_ID_SERVO10 = 149,
2030    #[doc = "Servo #11."]
2031    MAV_COMP_ID_SERVO11 = 150,
2032    #[doc = "Servo #12."]
2033    MAV_COMP_ID_SERVO12 = 151,
2034    #[doc = "Servo #13."]
2035    MAV_COMP_ID_SERVO13 = 152,
2036    #[doc = "Servo #14."]
2037    MAV_COMP_ID_SERVO14 = 153,
2038    #[doc = "Gimbal #1."]
2039    MAV_COMP_ID_GIMBAL = 154,
2040    #[doc = "Logging component."]
2041    MAV_COMP_ID_LOG = 155,
2042    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2043    MAV_COMP_ID_ADSB = 156,
2044    #[doc = "On Screen Display (OSD) devices for video links."]
2045    MAV_COMP_ID_OSD = 157,
2046    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2047    MAV_COMP_ID_PERIPHERAL = 158,
2048    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2049    #[doc = "Gimbal ID for QX1."]
2050    MAV_COMP_ID_QX1_GIMBAL = 159,
2051    #[doc = "FLARM collision alert component."]
2052    MAV_COMP_ID_FLARM = 160,
2053    #[doc = "Parachute component."]
2054    MAV_COMP_ID_PARACHUTE = 161,
2055    #[doc = "Winch component."]
2056    MAV_COMP_ID_WINCH = 169,
2057    #[doc = "Gimbal #2."]
2058    MAV_COMP_ID_GIMBAL2 = 171,
2059    #[doc = "Gimbal #3."]
2060    MAV_COMP_ID_GIMBAL3 = 172,
2061    #[doc = "Gimbal #4"]
2062    MAV_COMP_ID_GIMBAL4 = 173,
2063    #[doc = "Gimbal #5."]
2064    MAV_COMP_ID_GIMBAL5 = 174,
2065    #[doc = "Gimbal #6."]
2066    MAV_COMP_ID_GIMBAL6 = 175,
2067    #[doc = "Battery #1."]
2068    MAV_COMP_ID_BATTERY = 180,
2069    #[doc = "Battery #2."]
2070    MAV_COMP_ID_BATTERY2 = 181,
2071    #[doc = "CAN over MAVLink client."]
2072    MAV_COMP_ID_MAVCAN = 189,
2073    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2074    MAV_COMP_ID_MISSIONPLANNER = 190,
2075    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2076    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2077    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2078    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2079    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2080    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2081    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2082    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2083    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2084    MAV_COMP_ID_PATHPLANNER = 195,
2085    #[doc = "Component that plans a collision free path between two points."]
2086    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2087    #[doc = "Component that provides position estimates using VIO techniques."]
2088    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2089    #[doc = "Component that manages pairing of vehicle and GCS."]
2090    MAV_COMP_ID_PAIRING_MANAGER = 198,
2091    #[doc = "Inertial Measurement Unit (IMU) #1."]
2092    MAV_COMP_ID_IMU = 200,
2093    #[doc = "Inertial Measurement Unit (IMU) #2."]
2094    MAV_COMP_ID_IMU_2 = 201,
2095    #[doc = "Inertial Measurement Unit (IMU) #3."]
2096    MAV_COMP_ID_IMU_3 = 202,
2097    #[doc = "GPS #1."]
2098    MAV_COMP_ID_GPS = 220,
2099    #[doc = "GPS #2."]
2100    MAV_COMP_ID_GPS2 = 221,
2101    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2102    MAV_COMP_ID_ODID_TXRX_1 = 236,
2103    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2104    MAV_COMP_ID_ODID_TXRX_2 = 237,
2105    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2106    MAV_COMP_ID_ODID_TXRX_3 = 238,
2107    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2108    MAV_COMP_ID_UDP_BRIDGE = 240,
2109    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2110    MAV_COMP_ID_UART_BRIDGE = 241,
2111    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2112    MAV_COMP_ID_TUNNEL_NODE = 242,
2113    #[doc = "Illuminator"]
2114    MAV_COMP_ID_ILLUMINATOR = 243,
2115    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2116    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2117    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2118}
2119impl MavComponent {
2120    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2121}
2122impl Default for MavComponent {
2123    fn default() -> Self {
2124        Self::DEFAULT
2125    }
2126}
2127#[cfg_attr(feature = "ts", derive(TS))]
2128#[cfg_attr(feature = "ts", ts(export))]
2129#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2131#[cfg_attr(feature = "serde", serde(tag = "type"))]
2132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2133#[repr(u32)]
2134#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2135#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2136pub enum MavDataStream {
2137    #[doc = "Enable all data streams"]
2138    MAV_DATA_STREAM_ALL = 0,
2139    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2140    MAV_DATA_STREAM_RAW_SENSORS = 1,
2141    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2142    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2143    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2144    MAV_DATA_STREAM_RC_CHANNELS = 3,
2145    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2146    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2147    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2148    MAV_DATA_STREAM_POSITION = 6,
2149    #[doc = "Dependent on the autopilot"]
2150    MAV_DATA_STREAM_EXTRA1 = 10,
2151    #[doc = "Dependent on the autopilot"]
2152    MAV_DATA_STREAM_EXTRA2 = 11,
2153    #[doc = "Dependent on the autopilot"]
2154    MAV_DATA_STREAM_EXTRA3 = 12,
2155}
2156impl MavDataStream {
2157    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2158}
2159impl Default for MavDataStream {
2160    fn default() -> Self {
2161        Self::DEFAULT
2162    }
2163}
2164#[cfg_attr(feature = "ts", derive(TS))]
2165#[cfg_attr(feature = "ts", ts(export))]
2166#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2168#[cfg_attr(feature = "serde", serde(tag = "type"))]
2169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2170#[repr(u32)]
2171#[doc = "Enumeration of distance sensor types"]
2172pub enum MavDistanceSensor {
2173    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2174    MAV_DISTANCE_SENSOR_LASER = 0,
2175    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2176    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2177    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2178    MAV_DISTANCE_SENSOR_INFRARED = 2,
2179    #[doc = "Radar type, e.g. uLanding units"]
2180    MAV_DISTANCE_SENSOR_RADAR = 3,
2181    #[doc = "Broken or unknown type, e.g. analog units"]
2182    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2183}
2184impl MavDistanceSensor {
2185    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2186}
2187impl Default for MavDistanceSensor {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[cfg_attr(feature = "ts", derive(TS))]
2193#[cfg_attr(feature = "ts", ts(export))]
2194#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2195#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2196#[cfg_attr(feature = "serde", serde(tag = "type"))]
2197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2198#[repr(u32)]
2199#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2200pub enum MavDoRepositionFlags {
2201    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2202    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2203}
2204impl MavDoRepositionFlags {
2205    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2206}
2207impl Default for MavDoRepositionFlags {
2208    fn default() -> Self {
2209        Self::DEFAULT
2210    }
2211}
2212#[cfg_attr(feature = "ts", derive(TS))]
2213#[cfg_attr(feature = "ts", ts(export))]
2214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2216#[cfg_attr(feature = "serde", serde(tag = "type"))]
2217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2218#[repr(u32)]
2219#[doc = "Enumeration of estimator types"]
2220pub enum MavEstimatorType {
2221    #[doc = "Unknown type of the estimator."]
2222    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2223    #[doc = "This is a naive estimator without any real covariance feedback."]
2224    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2225    #[doc = "Computer vision based estimate. Might be up to scale."]
2226    MAV_ESTIMATOR_TYPE_VISION = 2,
2227    #[doc = "Visual-inertial estimate."]
2228    MAV_ESTIMATOR_TYPE_VIO = 3,
2229    #[doc = "Plain GPS estimate."]
2230    MAV_ESTIMATOR_TYPE_GPS = 4,
2231    #[doc = "Estimator integrating GPS and inertial sensing."]
2232    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2233    #[doc = "Estimate from external motion capturing system."]
2234    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2235    #[doc = "Estimator based on lidar sensor input."]
2236    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2237    #[doc = "Estimator on autopilot."]
2238    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2239}
2240impl MavEstimatorType {
2241    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2242}
2243impl Default for MavEstimatorType {
2244    fn default() -> Self {
2245        Self::DEFAULT
2246    }
2247}
2248#[cfg_attr(feature = "ts", derive(TS))]
2249#[cfg_attr(feature = "ts", ts(export))]
2250#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2251#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2252#[cfg_attr(feature = "serde", serde(tag = "type"))]
2253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2254#[repr(u32)]
2255#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2256pub enum MavEventCurrentSequenceFlags {
2257    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2258    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2259}
2260impl MavEventCurrentSequenceFlags {
2261    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2262}
2263impl Default for MavEventCurrentSequenceFlags {
2264    fn default() -> Self {
2265        Self::DEFAULT
2266    }
2267}
2268#[cfg_attr(feature = "ts", derive(TS))]
2269#[cfg_attr(feature = "ts", ts(export))]
2270#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2272#[cfg_attr(feature = "serde", serde(tag = "type"))]
2273#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2274#[repr(u32)]
2275#[doc = "Reason for an event error response."]
2276pub enum MavEventErrorReason {
2277    #[doc = "The requested event is not available (anymore)."]
2278    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2279}
2280impl MavEventErrorReason {
2281    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2282}
2283impl Default for MavEventErrorReason {
2284    fn default() -> Self {
2285        Self::DEFAULT
2286    }
2287}
2288#[cfg_attr(feature = "ts", derive(TS))]
2289#[cfg_attr(feature = "ts", ts(export))]
2290#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2291#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2292#[cfg_attr(feature = "serde", serde(tag = "type"))]
2293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2294#[repr(u32)]
2295#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2296pub enum MavFrame {
2297    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2298    MAV_FRAME_GLOBAL = 0,
2299    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2300    MAV_FRAME_LOCAL_NED = 1,
2301    #[doc = "NOT a coordinate frame, indicates a mission command."]
2302    MAV_FRAME_MISSION = 2,
2303    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2304    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2305    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2306    MAV_FRAME_LOCAL_ENU = 4,
2307    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2308    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2309    MAV_FRAME_GLOBAL_INT = 5,
2310    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2311    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2312    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2313    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2314    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2315    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2316    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2317    MAV_FRAME_BODY_NED = 8,
2318    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2319    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2320    MAV_FRAME_BODY_OFFSET_NED = 9,
2321    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2322    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2323    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2324    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2325    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2326    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2327    MAV_FRAME_BODY_FRD = 12,
2328    #[deprecated = "  (Deprecated since 2019-04)"]
2329    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2330    MAV_FRAME_RESERVED_13 = 13,
2331    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2332    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2333    MAV_FRAME_RESERVED_14 = 14,
2334    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2335    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2336    MAV_FRAME_RESERVED_15 = 15,
2337    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2338    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2339    MAV_FRAME_RESERVED_16 = 16,
2340    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2341    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2342    MAV_FRAME_RESERVED_17 = 17,
2343    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2344    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2345    MAV_FRAME_RESERVED_18 = 18,
2346    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2347    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2348    MAV_FRAME_RESERVED_19 = 19,
2349    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2350    MAV_FRAME_LOCAL_FRD = 20,
2351    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2352    MAV_FRAME_LOCAL_FLU = 21,
2353}
2354impl MavFrame {
2355    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2356}
2357impl Default for MavFrame {
2358    fn default() -> Self {
2359        Self::DEFAULT
2360    }
2361}
2362#[cfg_attr(feature = "ts", derive(TS))]
2363#[cfg_attr(feature = "ts", ts(export))]
2364#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2366#[cfg_attr(feature = "serde", serde(tag = "type"))]
2367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2368#[repr(u32)]
2369#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2370pub enum MavFtpErr {
2371    #[doc = "None: No error"]
2372    MAV_FTP_ERR_NONE = 0,
2373    #[doc = "Fail: Unknown failure"]
2374    MAV_FTP_ERR_FAIL = 1,
2375    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2376    MAV_FTP_ERR_FAILERRNO = 2,
2377    #[doc = "InvalidDataSize: Payload size is invalid"]
2378    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2379    #[doc = "InvalidSession: Session is not currently open"]
2380    MAV_FTP_ERR_INVALIDSESSION = 4,
2381    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2382    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2383    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2384    MAV_FTP_ERR_EOF = 6,
2385    #[doc = "UnknownCommand: Unknown command / opcode"]
2386    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2387    #[doc = "FileExists: File/directory already exists"]
2388    MAV_FTP_ERR_FILEEXISTS = 8,
2389    #[doc = "FileProtected: File/directory is write protected"]
2390    MAV_FTP_ERR_FILEPROTECTED = 9,
2391    #[doc = "FileNotFound: File/directory not found"]
2392    MAV_FTP_ERR_FILENOTFOUND = 10,
2393}
2394impl MavFtpErr {
2395    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2396}
2397impl Default for MavFtpErr {
2398    fn default() -> Self {
2399        Self::DEFAULT
2400    }
2401}
2402#[cfg_attr(feature = "ts", derive(TS))]
2403#[cfg_attr(feature = "ts", ts(export))]
2404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2406#[cfg_attr(feature = "serde", serde(tag = "type"))]
2407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2408#[repr(u32)]
2409#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2410pub enum MavFtpOpcode {
2411    #[doc = "None. Ignored, always ACKed"]
2412    MAV_FTP_OPCODE_NONE = 0,
2413    #[doc = "TerminateSession: Terminates open Read session"]
2414    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2415    #[doc = "ResetSessions: Terminates all open read sessions"]
2416    MAV_FTP_OPCODE_RESETSESSION = 2,
2417    #[doc = "ListDirectory. List files and directories in path from offset"]
2418    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2419    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2420    MAV_FTP_OPCODE_OPENFILERO = 4,
2421    #[doc = "ReadFile: Reads size bytes from offset in session"]
2422    MAV_FTP_OPCODE_READFILE = 5,
2423    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2424    MAV_FTP_OPCODE_CREATEFILE = 6,
2425    #[doc = "WriteFile: Writes size bytes to offset in session"]
2426    MAV_FTP_OPCODE_WRITEFILE = 7,
2427    #[doc = "RemoveFile: Remove file at path"]
2428    MAV_FTP_OPCODE_REMOVEFILE = 8,
2429    #[doc = "CreateDirectory: Creates directory at path"]
2430    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2431    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2432    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2433    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2434    MAV_FTP_OPCODE_OPENFILEWO = 11,
2435    #[doc = "TruncateFile: Truncate file at path to offset length"]
2436    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2437    #[doc = "Rename: Rename path1 to path2"]
2438    MAV_FTP_OPCODE_RENAME = 13,
2439    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2440    MAV_FTP_OPCODE_CALCFILECRC = 14,
2441    #[doc = "BurstReadFile: Burst download session file"]
2442    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2443    #[doc = "ACK: ACK response"]
2444    MAV_FTP_OPCODE_ACK = 128,
2445    #[doc = "NAK: NAK response"]
2446    MAV_FTP_OPCODE_NAK = 129,
2447}
2448impl MavFtpOpcode {
2449    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2450}
2451impl Default for MavFtpOpcode {
2452    fn default() -> Self {
2453        Self::DEFAULT
2454    }
2455}
2456#[cfg_attr(feature = "ts", derive(TS))]
2457#[cfg_attr(feature = "ts", ts(export))]
2458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2460#[cfg_attr(feature = "serde", serde(tag = "type"))]
2461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2462#[repr(u32)]
2463#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2464pub enum MavFuelType {
2465    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2466    MAV_FUEL_TYPE_UNKNOWN = 0,
2467    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2468    MAV_FUEL_TYPE_LIQUID = 1,
2469    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2470    MAV_FUEL_TYPE_GAS = 2,
2471}
2472impl MavFuelType {
2473    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2474}
2475impl Default for MavFuelType {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2481impl MavGeneratorStatusFlag {
2482    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2483}
2484impl Default for MavGeneratorStatusFlag {
2485    fn default() -> Self {
2486        Self::DEFAULT
2487    }
2488}
2489#[cfg_attr(feature = "ts", derive(TS))]
2490#[cfg_attr(feature = "ts", ts(export))]
2491#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2492#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2493#[cfg_attr(feature = "serde", serde(tag = "type"))]
2494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2495#[repr(u32)]
2496#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2497pub enum MavGoto {
2498    #[doc = "Hold at the current position."]
2499    MAV_GOTO_DO_HOLD = 0,
2500    #[doc = "Continue with the next item in mission execution."]
2501    MAV_GOTO_DO_CONTINUE = 1,
2502    #[doc = "Hold at the current position of the system"]
2503    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2504    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2505    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2506}
2507impl MavGoto {
2508    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2509}
2510impl Default for MavGoto {
2511    fn default() -> Self {
2512        Self::DEFAULT
2513    }
2514}
2515#[cfg_attr(feature = "ts", derive(TS))]
2516#[cfg_attr(feature = "ts", ts(export))]
2517#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2518#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2519#[cfg_attr(feature = "serde", serde(tag = "type"))]
2520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2521#[repr(u32)]
2522#[doc = "Enumeration of landed detector states"]
2523pub enum MavLandedState {
2524    #[doc = "MAV landed state is unknown"]
2525    MAV_LANDED_STATE_UNDEFINED = 0,
2526    #[doc = "MAV is landed (on ground)"]
2527    MAV_LANDED_STATE_ON_GROUND = 1,
2528    #[doc = "MAV is in air"]
2529    MAV_LANDED_STATE_IN_AIR = 2,
2530    #[doc = "MAV currently taking off"]
2531    MAV_LANDED_STATE_TAKEOFF = 3,
2532    #[doc = "MAV currently landing"]
2533    MAV_LANDED_STATE_LANDING = 4,
2534}
2535impl MavLandedState {
2536    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2537}
2538impl Default for MavLandedState {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543#[cfg_attr(feature = "ts", derive(TS))]
2544#[cfg_attr(feature = "ts", ts(export))]
2545#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2546#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2547#[cfg_attr(feature = "serde", serde(tag = "type"))]
2548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2549#[repr(u32)]
2550#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2551pub enum MavMissionResult {
2552    #[doc = "mission accepted OK"]
2553    MAV_MISSION_ACCEPTED = 0,
2554    #[doc = "Generic error / not accepting mission commands at all right now."]
2555    MAV_MISSION_ERROR = 1,
2556    #[doc = "Coordinate frame is not supported."]
2557    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2558    #[doc = "Command is not supported."]
2559    MAV_MISSION_UNSUPPORTED = 3,
2560    #[doc = "Mission items exceed storage space."]
2561    MAV_MISSION_NO_SPACE = 4,
2562    #[doc = "One of the parameters has an invalid value."]
2563    MAV_MISSION_INVALID = 5,
2564    #[doc = "param1 has an invalid value."]
2565    MAV_MISSION_INVALID_PARAM1 = 6,
2566    #[doc = "param2 has an invalid value."]
2567    MAV_MISSION_INVALID_PARAM2 = 7,
2568    #[doc = "param3 has an invalid value."]
2569    MAV_MISSION_INVALID_PARAM3 = 8,
2570    #[doc = "param4 has an invalid value."]
2571    MAV_MISSION_INVALID_PARAM4 = 9,
2572    #[doc = "x / param5 has an invalid value."]
2573    MAV_MISSION_INVALID_PARAM5_X = 10,
2574    #[doc = "y / param6 has an invalid value."]
2575    MAV_MISSION_INVALID_PARAM6_Y = 11,
2576    #[doc = "z / param7 has an invalid value."]
2577    MAV_MISSION_INVALID_PARAM7 = 12,
2578    #[doc = "Mission item received out of sequence"]
2579    MAV_MISSION_INVALID_SEQUENCE = 13,
2580    #[doc = "Not accepting any mission commands from this communication partner."]
2581    MAV_MISSION_DENIED = 14,
2582    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2583    MAV_MISSION_OPERATION_CANCELLED = 15,
2584}
2585impl MavMissionResult {
2586    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2587}
2588impl Default for MavMissionResult {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[cfg_attr(feature = "ts", derive(TS))]
2594#[cfg_attr(feature = "ts", ts(export))]
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[doc = "Type of mission items being requested/sent in mission protocol."]
2601pub enum MavMissionType {
2602    #[doc = "Items are mission commands for main mission."]
2603    MAV_MISSION_TYPE_MISSION = 0,
2604    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2605    MAV_MISSION_TYPE_FENCE = 1,
2606    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2607    MAV_MISSION_TYPE_RALLY = 2,
2608    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2609    MAV_MISSION_TYPE_ALL = 255,
2610}
2611impl MavMissionType {
2612    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2613}
2614impl Default for MavMissionType {
2615    fn default() -> Self {
2616        Self::DEFAULT
2617    }
2618}
2619#[cfg_attr(feature = "ts", derive(TS))]
2620#[cfg_attr(feature = "ts", ts(export))]
2621#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2622#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2623#[cfg_attr(feature = "serde", serde(tag = "type"))]
2624#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2625#[repr(u32)]
2626#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2627pub enum MavMode {
2628    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2629    MAV_MODE_PREFLIGHT = 0,
2630    #[doc = "System is allowed to be active, under assisted RC control."]
2631    MAV_MODE_STABILIZE_DISARMED = 80,
2632    #[doc = "System is allowed to be active, under assisted RC control."]
2633    MAV_MODE_STABILIZE_ARMED = 208,
2634    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2635    MAV_MODE_MANUAL_DISARMED = 64,
2636    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2637    MAV_MODE_MANUAL_ARMED = 192,
2638    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2639    MAV_MODE_GUIDED_DISARMED = 88,
2640    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2641    MAV_MODE_GUIDED_ARMED = 216,
2642    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2643    MAV_MODE_AUTO_DISARMED = 92,
2644    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2645    MAV_MODE_AUTO_ARMED = 220,
2646    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2647    MAV_MODE_TEST_DISARMED = 66,
2648    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2649    MAV_MODE_TEST_ARMED = 194,
2650}
2651impl MavMode {
2652    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2653}
2654impl Default for MavMode {
2655    fn default() -> Self {
2656        Self::DEFAULT
2657    }
2658}
2659bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2660impl MavModeFlag {
2661    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2662}
2663impl Default for MavModeFlag {
2664    fn default() -> Self {
2665        Self::DEFAULT
2666    }
2667}
2668#[cfg_attr(feature = "ts", derive(TS))]
2669#[cfg_attr(feature = "ts", ts(export))]
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2676pub enum MavModeFlagDecodePosition {
2677    #[doc = "First bit:  10000000"]
2678    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2679    #[doc = "Second bit: 01000000"]
2680    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2681    #[doc = "Third bit:  00100000"]
2682    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2683    #[doc = "Fourth bit: 00010000"]
2684    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2685    #[doc = "Fifth bit:  00001000"]
2686    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2687    #[doc = "Sixth bit:   00000100"]
2688    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2689    #[doc = "Seventh bit: 00000010"]
2690    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2691    #[doc = "Eighth bit: 00000001"]
2692    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2693}
2694impl MavModeFlagDecodePosition {
2695    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2696}
2697impl Default for MavModeFlagDecodePosition {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2703impl MavModeProperty {
2704    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2705}
2706impl Default for MavModeProperty {
2707    fn default() -> Self {
2708        Self::DEFAULT
2709    }
2710}
2711#[cfg_attr(feature = "ts", derive(TS))]
2712#[cfg_attr(feature = "ts", ts(export))]
2713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "serde", serde(tag = "type"))]
2716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2717#[repr(u32)]
2718#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2719#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2720pub enum MavMountMode {
2721    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2722    MAV_MOUNT_MODE_RETRACT = 0,
2723    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2724    MAV_MOUNT_MODE_NEUTRAL = 1,
2725    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2726    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2727    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2728    MAV_MOUNT_MODE_RC_TARGETING = 3,
2729    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2730    MAV_MOUNT_MODE_GPS_POINT = 4,
2731    #[doc = "Gimbal tracks system with specified system ID"]
2732    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2733    #[doc = "Gimbal tracks home position"]
2734    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2735}
2736impl MavMountMode {
2737    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2738}
2739impl Default for MavMountMode {
2740    fn default() -> Self {
2741        Self::DEFAULT
2742    }
2743}
2744#[cfg_attr(feature = "ts", derive(TS))]
2745#[cfg_attr(feature = "ts", ts(export))]
2746#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2747#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2748#[cfg_attr(feature = "serde", serde(tag = "type"))]
2749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2750#[repr(u32)]
2751pub enum MavOdidArmStatus {
2752    #[doc = "Passing arming checks."]
2753    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2754    #[doc = "Generic arming failure, see error string for details."]
2755    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2756}
2757impl MavOdidArmStatus {
2758    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2759}
2760impl Default for MavOdidArmStatus {
2761    fn default() -> Self {
2762        Self::DEFAULT
2763    }
2764}
2765#[cfg_attr(feature = "ts", derive(TS))]
2766#[cfg_attr(feature = "ts", ts(export))]
2767#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2768#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2769#[cfg_attr(feature = "serde", serde(tag = "type"))]
2770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2771#[repr(u32)]
2772pub enum MavOdidAuthType {
2773    #[doc = "No authentication type is specified."]
2774    MAV_ODID_AUTH_TYPE_NONE = 0,
2775    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2776    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2777    #[doc = "Signature for the Operator ID."]
2778    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2779    #[doc = "Signature for the entire message set."]
2780    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2781    #[doc = "Authentication is provided by Network Remote ID."]
2782    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2783    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2784    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2785}
2786impl MavOdidAuthType {
2787    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2788}
2789impl Default for MavOdidAuthType {
2790    fn default() -> Self {
2791        Self::DEFAULT
2792    }
2793}
2794#[cfg_attr(feature = "ts", derive(TS))]
2795#[cfg_attr(feature = "ts", ts(export))]
2796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2798#[cfg_attr(feature = "serde", serde(tag = "type"))]
2799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2800#[repr(u32)]
2801pub enum MavOdidCategoryEu {
2802    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2803    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2804    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2805    MAV_ODID_CATEGORY_EU_OPEN = 1,
2806    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2807    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2808    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2809    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2810}
2811impl MavOdidCategoryEu {
2812    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2813}
2814impl Default for MavOdidCategoryEu {
2815    fn default() -> Self {
2816        Self::DEFAULT
2817    }
2818}
2819#[cfg_attr(feature = "ts", derive(TS))]
2820#[cfg_attr(feature = "ts", ts(export))]
2821#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2823#[cfg_attr(feature = "serde", serde(tag = "type"))]
2824#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2825#[repr(u32)]
2826pub enum MavOdidClassEu {
2827    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2828    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2829    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2830    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2831    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2832    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2833    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2834    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2835    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2836    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2837    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2838    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2839    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2840    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2841    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2842    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2843}
2844impl MavOdidClassEu {
2845    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2846}
2847impl Default for MavOdidClassEu {
2848    fn default() -> Self {
2849        Self::DEFAULT
2850    }
2851}
2852#[cfg_attr(feature = "ts", derive(TS))]
2853#[cfg_attr(feature = "ts", ts(export))]
2854#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2856#[cfg_attr(feature = "serde", serde(tag = "type"))]
2857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2858#[repr(u32)]
2859pub enum MavOdidClassificationType {
2860    #[doc = "The classification type for the UA is undeclared."]
2861    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2862    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2863    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2864}
2865impl MavOdidClassificationType {
2866    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2867}
2868impl Default for MavOdidClassificationType {
2869    fn default() -> Self {
2870        Self::DEFAULT
2871    }
2872}
2873#[cfg_attr(feature = "ts", derive(TS))]
2874#[cfg_attr(feature = "ts", ts(export))]
2875#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2877#[cfg_attr(feature = "serde", serde(tag = "type"))]
2878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2879#[repr(u32)]
2880pub enum MavOdidDescType {
2881    #[doc = "Optional free-form text description of the purpose of the flight."]
2882    MAV_ODID_DESC_TYPE_TEXT = 0,
2883    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2884    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2885    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2886    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2887}
2888impl MavOdidDescType {
2889    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2890}
2891impl Default for MavOdidDescType {
2892    fn default() -> Self {
2893        Self::DEFAULT
2894    }
2895}
2896#[cfg_attr(feature = "ts", derive(TS))]
2897#[cfg_attr(feature = "ts", ts(export))]
2898#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2900#[cfg_attr(feature = "serde", serde(tag = "type"))]
2901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2902#[repr(u32)]
2903pub enum MavOdidHeightRef {
2904    #[doc = "The height field is relative to the take-off location."]
2905    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2906    #[doc = "The height field is relative to ground."]
2907    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2908}
2909impl MavOdidHeightRef {
2910    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2911}
2912impl Default for MavOdidHeightRef {
2913    fn default() -> Self {
2914        Self::DEFAULT
2915    }
2916}
2917#[cfg_attr(feature = "ts", derive(TS))]
2918#[cfg_attr(feature = "ts", ts(export))]
2919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2921#[cfg_attr(feature = "serde", serde(tag = "type"))]
2922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2923#[repr(u32)]
2924pub enum MavOdidHorAcc {
2925    #[doc = "The horizontal accuracy is unknown."]
2926    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2927    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2928    MAV_ODID_HOR_ACC_10NM = 1,
2929    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2930    MAV_ODID_HOR_ACC_4NM = 2,
2931    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2932    MAV_ODID_HOR_ACC_2NM = 3,
2933    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2934    MAV_ODID_HOR_ACC_1NM = 4,
2935    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2936    MAV_ODID_HOR_ACC_0_5NM = 5,
2937    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2938    MAV_ODID_HOR_ACC_0_3NM = 6,
2939    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2940    MAV_ODID_HOR_ACC_0_1NM = 7,
2941    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2942    MAV_ODID_HOR_ACC_0_05NM = 8,
2943    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2944    MAV_ODID_HOR_ACC_30_METER = 9,
2945    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2946    MAV_ODID_HOR_ACC_10_METER = 10,
2947    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2948    MAV_ODID_HOR_ACC_3_METER = 11,
2949    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2950    MAV_ODID_HOR_ACC_1_METER = 12,
2951}
2952impl MavOdidHorAcc {
2953    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2954}
2955impl Default for MavOdidHorAcc {
2956    fn default() -> Self {
2957        Self::DEFAULT
2958    }
2959}
2960#[cfg_attr(feature = "ts", derive(TS))]
2961#[cfg_attr(feature = "ts", ts(export))]
2962#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2964#[cfg_attr(feature = "serde", serde(tag = "type"))]
2965#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2966#[repr(u32)]
2967pub enum MavOdidIdType {
2968    #[doc = "No type defined."]
2969    MAV_ODID_ID_TYPE_NONE = 0,
2970    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2971    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2972    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2973    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2974    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2975    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2976    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2977    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2978}
2979impl MavOdidIdType {
2980    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2981}
2982impl Default for MavOdidIdType {
2983    fn default() -> Self {
2984        Self::DEFAULT
2985    }
2986}
2987#[cfg_attr(feature = "ts", derive(TS))]
2988#[cfg_attr(feature = "ts", ts(export))]
2989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2991#[cfg_attr(feature = "serde", serde(tag = "type"))]
2992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2993#[repr(u32)]
2994pub enum MavOdidOperatorIdType {
2995    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2996    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2997}
2998impl MavOdidOperatorIdType {
2999    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3000}
3001impl Default for MavOdidOperatorIdType {
3002    fn default() -> Self {
3003        Self::DEFAULT
3004    }
3005}
3006#[cfg_attr(feature = "ts", derive(TS))]
3007#[cfg_attr(feature = "ts", ts(export))]
3008#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3009#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3010#[cfg_attr(feature = "serde", serde(tag = "type"))]
3011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3012#[repr(u32)]
3013pub enum MavOdidOperatorLocationType {
3014    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3015    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3016    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3017    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3018    #[doc = "The location/altitude of the operator are fixed values."]
3019    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3020}
3021impl MavOdidOperatorLocationType {
3022    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3023}
3024impl Default for MavOdidOperatorLocationType {
3025    fn default() -> Self {
3026        Self::DEFAULT
3027    }
3028}
3029#[cfg_attr(feature = "ts", derive(TS))]
3030#[cfg_attr(feature = "ts", ts(export))]
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidSpeedAcc {
3037    #[doc = "The speed accuracy is unknown."]
3038    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3039    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3040    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3041    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3042    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3043    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3044    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3045    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3046    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3047}
3048impl MavOdidSpeedAcc {
3049    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3050}
3051impl Default for MavOdidSpeedAcc {
3052    fn default() -> Self {
3053        Self::DEFAULT
3054    }
3055}
3056#[cfg_attr(feature = "ts", derive(TS))]
3057#[cfg_attr(feature = "ts", ts(export))]
3058#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3059#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3060#[cfg_attr(feature = "serde", serde(tag = "type"))]
3061#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3062#[repr(u32)]
3063pub enum MavOdidStatus {
3064    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3065    MAV_ODID_STATUS_UNDECLARED = 0,
3066    #[doc = "The UA is on the ground."]
3067    MAV_ODID_STATUS_GROUND = 1,
3068    #[doc = "The UA is in the air."]
3069    MAV_ODID_STATUS_AIRBORNE = 2,
3070    #[doc = "The UA is having an emergency."]
3071    MAV_ODID_STATUS_EMERGENCY = 3,
3072    #[doc = "The remote ID system is failing or unreliable in some way."]
3073    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3074}
3075impl MavOdidStatus {
3076    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3077}
3078impl Default for MavOdidStatus {
3079    fn default() -> Self {
3080        Self::DEFAULT
3081    }
3082}
3083#[cfg_attr(feature = "ts", derive(TS))]
3084#[cfg_attr(feature = "ts", ts(export))]
3085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3087#[cfg_attr(feature = "serde", serde(tag = "type"))]
3088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3089#[repr(u32)]
3090pub enum MavOdidTimeAcc {
3091    #[doc = "The timestamp accuracy is unknown."]
3092    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3093    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3094    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3095    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3096    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3097    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3098    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3099    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3100    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3101    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3102    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3103    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3104    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3105    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3106    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3107    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3108    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3109    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3110    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3111    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3112    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3113    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3114    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3115    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3116    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3117    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3118    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3119    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3120    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3121    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3122    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3123}
3124impl MavOdidTimeAcc {
3125    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3126}
3127impl Default for MavOdidTimeAcc {
3128    fn default() -> Self {
3129        Self::DEFAULT
3130    }
3131}
3132#[cfg_attr(feature = "ts", derive(TS))]
3133#[cfg_attr(feature = "ts", ts(export))]
3134#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3136#[cfg_attr(feature = "serde", serde(tag = "type"))]
3137#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3138#[repr(u32)]
3139pub enum MavOdidUaType {
3140    #[doc = "No UA (Unmanned Aircraft) type defined."]
3141    MAV_ODID_UA_TYPE_NONE = 0,
3142    #[doc = "Aeroplane/Airplane. Fixed wing."]
3143    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3144    #[doc = "Helicopter or multirotor."]
3145    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3146    #[doc = "Gyroplane."]
3147    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3148    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3149    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3150    #[doc = "Ornithopter."]
3151    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3152    #[doc = "Glider."]
3153    MAV_ODID_UA_TYPE_GLIDER = 6,
3154    #[doc = "Kite."]
3155    MAV_ODID_UA_TYPE_KITE = 7,
3156    #[doc = "Free Balloon."]
3157    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3158    #[doc = "Captive Balloon."]
3159    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3160    #[doc = "Airship. E.g. a blimp."]
3161    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3162    #[doc = "Free Fall/Parachute (unpowered)."]
3163    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3164    #[doc = "Rocket."]
3165    MAV_ODID_UA_TYPE_ROCKET = 12,
3166    #[doc = "Tethered powered aircraft."]
3167    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3168    #[doc = "Ground Obstacle."]
3169    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3170    #[doc = "Other type of aircraft not listed earlier."]
3171    MAV_ODID_UA_TYPE_OTHER = 15,
3172}
3173impl MavOdidUaType {
3174    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3175}
3176impl Default for MavOdidUaType {
3177    fn default() -> Self {
3178        Self::DEFAULT
3179    }
3180}
3181#[cfg_attr(feature = "ts", derive(TS))]
3182#[cfg_attr(feature = "ts", ts(export))]
3183#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3185#[cfg_attr(feature = "serde", serde(tag = "type"))]
3186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3187#[repr(u32)]
3188pub enum MavOdidVerAcc {
3189    #[doc = "The vertical accuracy is unknown."]
3190    MAV_ODID_VER_ACC_UNKNOWN = 0,
3191    #[doc = "The vertical accuracy is smaller than 150 meter."]
3192    MAV_ODID_VER_ACC_150_METER = 1,
3193    #[doc = "The vertical accuracy is smaller than 45 meter."]
3194    MAV_ODID_VER_ACC_45_METER = 2,
3195    #[doc = "The vertical accuracy is smaller than 25 meter."]
3196    MAV_ODID_VER_ACC_25_METER = 3,
3197    #[doc = "The vertical accuracy is smaller than 10 meter."]
3198    MAV_ODID_VER_ACC_10_METER = 4,
3199    #[doc = "The vertical accuracy is smaller than 3 meter."]
3200    MAV_ODID_VER_ACC_3_METER = 5,
3201    #[doc = "The vertical accuracy is smaller than 1 meter."]
3202    MAV_ODID_VER_ACC_1_METER = 6,
3203}
3204impl MavOdidVerAcc {
3205    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3206}
3207impl Default for MavOdidVerAcc {
3208    fn default() -> Self {
3209        Self::DEFAULT
3210    }
3211}
3212#[cfg_attr(feature = "ts", derive(TS))]
3213#[cfg_attr(feature = "ts", ts(export))]
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3220pub enum MavParamExtType {
3221    #[doc = "8-bit unsigned integer"]
3222    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3223    #[doc = "8-bit signed integer"]
3224    MAV_PARAM_EXT_TYPE_INT8 = 2,
3225    #[doc = "16-bit unsigned integer"]
3226    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3227    #[doc = "16-bit signed integer"]
3228    MAV_PARAM_EXT_TYPE_INT16 = 4,
3229    #[doc = "32-bit unsigned integer"]
3230    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3231    #[doc = "32-bit signed integer"]
3232    MAV_PARAM_EXT_TYPE_INT32 = 6,
3233    #[doc = "64-bit unsigned integer"]
3234    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3235    #[doc = "64-bit signed integer"]
3236    MAV_PARAM_EXT_TYPE_INT64 = 8,
3237    #[doc = "32-bit floating-point"]
3238    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3239    #[doc = "64-bit floating-point"]
3240    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3241    #[doc = "Custom Type"]
3242    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3243}
3244impl MavParamExtType {
3245    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3246}
3247impl Default for MavParamExtType {
3248    fn default() -> Self {
3249        Self::DEFAULT
3250    }
3251}
3252#[cfg_attr(feature = "ts", derive(TS))]
3253#[cfg_attr(feature = "ts", ts(export))]
3254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3256#[cfg_attr(feature = "serde", serde(tag = "type"))]
3257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3258#[repr(u32)]
3259#[doc = "Specifies the datatype of a MAVLink parameter."]
3260pub enum MavParamType {
3261    #[doc = "8-bit unsigned integer"]
3262    MAV_PARAM_TYPE_UINT8 = 1,
3263    #[doc = "8-bit signed integer"]
3264    MAV_PARAM_TYPE_INT8 = 2,
3265    #[doc = "16-bit unsigned integer"]
3266    MAV_PARAM_TYPE_UINT16 = 3,
3267    #[doc = "16-bit signed integer"]
3268    MAV_PARAM_TYPE_INT16 = 4,
3269    #[doc = "32-bit unsigned integer"]
3270    MAV_PARAM_TYPE_UINT32 = 5,
3271    #[doc = "32-bit signed integer"]
3272    MAV_PARAM_TYPE_INT32 = 6,
3273    #[doc = "64-bit unsigned integer"]
3274    MAV_PARAM_TYPE_UINT64 = 7,
3275    #[doc = "64-bit signed integer"]
3276    MAV_PARAM_TYPE_INT64 = 8,
3277    #[doc = "32-bit floating-point"]
3278    MAV_PARAM_TYPE_REAL32 = 9,
3279    #[doc = "64-bit floating-point"]
3280    MAV_PARAM_TYPE_REAL64 = 10,
3281}
3282impl MavParamType {
3283    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3284}
3285impl Default for MavParamType {
3286    fn default() -> Self {
3287        Self::DEFAULT
3288    }
3289}
3290bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3291impl MavPowerStatus {
3292    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3293}
3294impl Default for MavPowerStatus {
3295    fn default() -> Self {
3296        Self::DEFAULT
3297    }
3298}
3299bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3300impl MavProtocolCapability {
3301    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3302}
3303impl Default for MavProtocolCapability {
3304    fn default() -> Self {
3305        Self::DEFAULT
3306    }
3307}
3308#[cfg_attr(feature = "ts", derive(TS))]
3309#[cfg_attr(feature = "ts", ts(export))]
3310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3312#[cfg_attr(feature = "serde", serde(tag = "type"))]
3313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3314#[repr(u32)]
3315#[doc = "Result from a MAVLink command (MAV_CMD)"]
3316pub enum MavResult {
3317    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3318    MAV_RESULT_ACCEPTED = 0,
3319    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3320    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3321    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3322    MAV_RESULT_DENIED = 2,
3323    #[doc = "Command is not supported (unknown)."]
3324    MAV_RESULT_UNSUPPORTED = 3,
3325    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3326    MAV_RESULT_FAILED = 4,
3327    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3328    MAV_RESULT_IN_PROGRESS = 5,
3329    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3330    MAV_RESULT_CANCELLED = 6,
3331    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3332    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3333    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3334    MAV_RESULT_COMMAND_INT_ONLY = 8,
3335    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3336    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3337}
3338impl MavResult {
3339    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3340}
3341impl Default for MavResult {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[cfg_attr(feature = "ts", derive(TS))]
3347#[cfg_attr(feature = "ts", ts(export))]
3348#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3350#[cfg_attr(feature = "serde", serde(tag = "type"))]
3351#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3352#[repr(u32)]
3353#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3354#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3355pub enum MavRoi {
3356    #[doc = "No region of interest."]
3357    MAV_ROI_NONE = 0,
3358    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3359    MAV_ROI_WPNEXT = 1,
3360    #[doc = "Point toward given waypoint."]
3361    MAV_ROI_WPINDEX = 2,
3362    #[doc = "Point toward fixed location."]
3363    MAV_ROI_LOCATION = 3,
3364    #[doc = "Point toward of given id."]
3365    MAV_ROI_TARGET = 4,
3366}
3367impl MavRoi {
3368    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3369}
3370impl Default for MavRoi {
3371    fn default() -> Self {
3372        Self::DEFAULT
3373    }
3374}
3375#[cfg_attr(feature = "ts", derive(TS))]
3376#[cfg_attr(feature = "ts", ts(export))]
3377#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3378#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3379#[cfg_attr(feature = "serde", serde(tag = "type"))]
3380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3381#[repr(u32)]
3382#[doc = "Enumeration of sensor orientation, according to its rotations"]
3383pub enum MavSensorOrientation {
3384    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3385    MAV_SENSOR_ROTATION_NONE = 0,
3386    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3387    MAV_SENSOR_ROTATION_YAW_45 = 1,
3388    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3389    MAV_SENSOR_ROTATION_YAW_90 = 2,
3390    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3391    MAV_SENSOR_ROTATION_YAW_135 = 3,
3392    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3393    MAV_SENSOR_ROTATION_YAW_180 = 4,
3394    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3395    MAV_SENSOR_ROTATION_YAW_225 = 5,
3396    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3397    MAV_SENSOR_ROTATION_YAW_270 = 6,
3398    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3399    MAV_SENSOR_ROTATION_YAW_315 = 7,
3400    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3401    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3402    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3403    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3404    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3405    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3406    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3407    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3408    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3409    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3410    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3411    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3412    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3413    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3414    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3415    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3416    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3417    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3418    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3419    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3420    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3421    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3422    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3423    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3424    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3425    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3426    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3427    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3428    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3429    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3430    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3431    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3432    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3433    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3434    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3435    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3436    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3437    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3438    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3439    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3440    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3441    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3442    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3443    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3444    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3445    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3446    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3447    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3448    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3449    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3450    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3451    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3452    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3453    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3454    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3455    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3456    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3457    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3458    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3459    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3460    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3461    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3462    #[doc = "Pitch: 315"]
3463    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3464    #[doc = "Roll: 90, Pitch: 315"]
3465    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3466    #[doc = "Custom orientation"]
3467    MAV_SENSOR_ROTATION_CUSTOM = 100,
3468}
3469impl MavSensorOrientation {
3470    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3471}
3472impl Default for MavSensorOrientation {
3473    fn default() -> Self {
3474        Self::DEFAULT
3475    }
3476}
3477#[cfg_attr(feature = "ts", derive(TS))]
3478#[cfg_attr(feature = "ts", ts(export))]
3479#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3481#[cfg_attr(feature = "serde", serde(tag = "type"))]
3482#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3483#[repr(u32)]
3484#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3485pub enum MavSeverity {
3486    #[doc = "System is unusable. This is a \"panic\" condition."]
3487    MAV_SEVERITY_EMERGENCY = 0,
3488    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3489    MAV_SEVERITY_ALERT = 1,
3490    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3491    MAV_SEVERITY_CRITICAL = 2,
3492    #[doc = "Indicates an error in secondary/redundant systems."]
3493    MAV_SEVERITY_ERROR = 3,
3494    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3495    MAV_SEVERITY_WARNING = 4,
3496    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3497    MAV_SEVERITY_NOTICE = 5,
3498    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3499    MAV_SEVERITY_INFO = 6,
3500    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3501    MAV_SEVERITY_DEBUG = 7,
3502}
3503impl MavSeverity {
3504    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3505}
3506impl Default for MavSeverity {
3507    fn default() -> Self {
3508        Self::DEFAULT
3509    }
3510}
3511#[cfg_attr(feature = "ts", derive(TS))]
3512#[cfg_attr(feature = "ts", ts(export))]
3513#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3515#[cfg_attr(feature = "serde", serde(tag = "type"))]
3516#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3517#[repr(u32)]
3518#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3519pub enum MavStandardMode {
3520    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3521    MAV_STANDARD_MODE_NON_STANDARD = 0,
3522    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3523    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3524    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3525    MAV_STANDARD_MODE_ORBIT = 2,
3526    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3527    MAV_STANDARD_MODE_CRUISE = 3,
3528    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3529    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3530    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3531    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3532    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3533    MAV_STANDARD_MODE_MISSION = 6,
3534    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3535    MAV_STANDARD_MODE_LAND = 7,
3536    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3537    MAV_STANDARD_MODE_TAKEOFF = 8,
3538}
3539impl MavStandardMode {
3540    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3541}
3542impl Default for MavStandardMode {
3543    fn default() -> Self {
3544        Self::DEFAULT
3545    }
3546}
3547#[cfg_attr(feature = "ts", derive(TS))]
3548#[cfg_attr(feature = "ts", ts(export))]
3549#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3551#[cfg_attr(feature = "serde", serde(tag = "type"))]
3552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3553#[repr(u32)]
3554pub enum MavState {
3555    #[doc = "Uninitialized system, state is unknown."]
3556    MAV_STATE_UNINIT = 0,
3557    #[doc = "System is booting up."]
3558    MAV_STATE_BOOT = 1,
3559    #[doc = "System is calibrating and not flight-ready."]
3560    MAV_STATE_CALIBRATING = 2,
3561    #[doc = "System is grounded and on standby. It can be launched any time."]
3562    MAV_STATE_STANDBY = 3,
3563    #[doc = "System is active and might be already airborne. Motors are engaged."]
3564    MAV_STATE_ACTIVE = 4,
3565    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3566    MAV_STATE_CRITICAL = 5,
3567    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3568    MAV_STATE_EMERGENCY = 6,
3569    #[doc = "System just initialized its power-down sequence, will shut down now."]
3570    MAV_STATE_POWEROFF = 7,
3571    #[doc = "System is terminating itself (failsafe or commanded)."]
3572    MAV_STATE_FLIGHT_TERMINATION = 8,
3573}
3574impl MavState {
3575    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3576}
3577impl Default for MavState {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3583impl MavSysStatusSensor {
3584    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3585}
3586impl Default for MavSysStatusSensor {
3587    fn default() -> Self {
3588        Self::DEFAULT
3589    }
3590}
3591bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3592impl MavSysStatusSensorExtended {
3593    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3594}
3595impl Default for MavSysStatusSensorExtended {
3596    fn default() -> Self {
3597        Self::DEFAULT
3598    }
3599}
3600#[cfg_attr(feature = "ts", derive(TS))]
3601#[cfg_attr(feature = "ts", ts(export))]
3602#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3604#[cfg_attr(feature = "serde", serde(tag = "type"))]
3605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3606#[repr(u32)]
3607pub enum MavTunnelPayloadType {
3608    #[doc = "Encoding of payload unknown."]
3609    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3610    #[doc = "Registered for STorM32 gimbal controller."]
3611    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3612    #[doc = "Registered for STorM32 gimbal controller."]
3613    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3614    #[doc = "Registered for STorM32 gimbal controller."]
3615    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3616    #[doc = "Registered for STorM32 gimbal controller."]
3617    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3618    #[doc = "Registered for STorM32 gimbal controller."]
3619    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3620    #[doc = "Registered for STorM32 gimbal controller."]
3621    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3622    #[doc = "Registered for STorM32 gimbal controller."]
3623    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3624    #[doc = "Registered for STorM32 gimbal controller."]
3625    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3626    #[doc = "Registered for STorM32 gimbal controller."]
3627    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3628    #[doc = "Registered for STorM32 gimbal controller."]
3629    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3630    #[doc = "Registered for ModalAI remote OSD protocol."]
3631    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3632    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3633    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3634    #[doc = "Registered for ModalAI vendor use."]
3635    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3636}
3637impl MavTunnelPayloadType {
3638    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3639}
3640impl Default for MavTunnelPayloadType {
3641    fn default() -> Self {
3642        Self::DEFAULT
3643    }
3644}
3645#[cfg_attr(feature = "ts", derive(TS))]
3646#[cfg_attr(feature = "ts", ts(export))]
3647#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3649#[cfg_attr(feature = "serde", serde(tag = "type"))]
3650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3651#[repr(u32)]
3652#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3653pub enum MavType {
3654    #[doc = "Generic micro air vehicle"]
3655    MAV_TYPE_GENERIC = 0,
3656    #[doc = "Fixed wing aircraft."]
3657    MAV_TYPE_FIXED_WING = 1,
3658    #[doc = "Quadrotor"]
3659    MAV_TYPE_QUADROTOR = 2,
3660    #[doc = "Coaxial helicopter"]
3661    MAV_TYPE_COAXIAL = 3,
3662    #[doc = "Normal helicopter with tail rotor."]
3663    MAV_TYPE_HELICOPTER = 4,
3664    #[doc = "Ground installation"]
3665    MAV_TYPE_ANTENNA_TRACKER = 5,
3666    #[doc = "Operator control unit / ground control station"]
3667    MAV_TYPE_GCS = 6,
3668    #[doc = "Airship, controlled"]
3669    MAV_TYPE_AIRSHIP = 7,
3670    #[doc = "Free balloon, uncontrolled"]
3671    MAV_TYPE_FREE_BALLOON = 8,
3672    #[doc = "Rocket"]
3673    MAV_TYPE_ROCKET = 9,
3674    #[doc = "Ground rover"]
3675    MAV_TYPE_GROUND_ROVER = 10,
3676    #[doc = "Surface vessel, boat, ship"]
3677    MAV_TYPE_SURFACE_BOAT = 11,
3678    #[doc = "Submarine"]
3679    MAV_TYPE_SUBMARINE = 12,
3680    #[doc = "Hexarotor"]
3681    MAV_TYPE_HEXAROTOR = 13,
3682    #[doc = "Octorotor"]
3683    MAV_TYPE_OCTOROTOR = 14,
3684    #[doc = "Tricopter"]
3685    MAV_TYPE_TRICOPTER = 15,
3686    #[doc = "Flapping wing"]
3687    MAV_TYPE_FLAPPING_WING = 16,
3688    #[doc = "Kite"]
3689    MAV_TYPE_KITE = 17,
3690    #[doc = "Onboard companion controller"]
3691    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3692    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3693    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3694    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3695    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3696    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3697    MAV_TYPE_VTOL_TILTROTOR = 21,
3698    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3699    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3700    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3701    MAV_TYPE_VTOL_TAILSITTER = 23,
3702    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3703    MAV_TYPE_VTOL_TILTWING = 24,
3704    #[doc = "VTOL reserved 5"]
3705    MAV_TYPE_VTOL_RESERVED5 = 25,
3706    #[doc = "Gimbal"]
3707    MAV_TYPE_GIMBAL = 26,
3708    #[doc = "ADSB system"]
3709    MAV_TYPE_ADSB = 27,
3710    #[doc = "Steerable, nonrigid airfoil"]
3711    MAV_TYPE_PARAFOIL = 28,
3712    #[doc = "Dodecarotor"]
3713    MAV_TYPE_DODECAROTOR = 29,
3714    #[doc = "Camera"]
3715    MAV_TYPE_CAMERA = 30,
3716    #[doc = "Charging station"]
3717    MAV_TYPE_CHARGING_STATION = 31,
3718    #[doc = "FLARM collision avoidance system"]
3719    MAV_TYPE_FLARM = 32,
3720    #[doc = "Servo"]
3721    MAV_TYPE_SERVO = 33,
3722    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3723    MAV_TYPE_ODID = 34,
3724    #[doc = "Decarotor"]
3725    MAV_TYPE_DECAROTOR = 35,
3726    #[doc = "Battery"]
3727    MAV_TYPE_BATTERY = 36,
3728    #[doc = "Parachute"]
3729    MAV_TYPE_PARACHUTE = 37,
3730    #[doc = "Log"]
3731    MAV_TYPE_LOG = 38,
3732    #[doc = "OSD"]
3733    MAV_TYPE_OSD = 39,
3734    #[doc = "IMU"]
3735    MAV_TYPE_IMU = 40,
3736    #[doc = "GPS"]
3737    MAV_TYPE_GPS = 41,
3738    #[doc = "Winch"]
3739    MAV_TYPE_WINCH = 42,
3740    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3741    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3742    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3743    MAV_TYPE_ILLUMINATOR = 44,
3744    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3745    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3746}
3747impl MavType {
3748    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3749}
3750impl Default for MavType {
3751    fn default() -> Self {
3752        Self::DEFAULT
3753    }
3754}
3755#[cfg_attr(feature = "ts", derive(TS))]
3756#[cfg_attr(feature = "ts", ts(export))]
3757#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3759#[cfg_attr(feature = "serde", serde(tag = "type"))]
3760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3761#[repr(u32)]
3762#[doc = "Enumeration of VTOL states"]
3763pub enum MavVtolState {
3764    #[doc = "MAV is not configured as VTOL"]
3765    MAV_VTOL_STATE_UNDEFINED = 0,
3766    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3767    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3768    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3769    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3770    #[doc = "VTOL is in multicopter state"]
3771    MAV_VTOL_STATE_MC = 3,
3772    #[doc = "VTOL is in fixed-wing state"]
3773    MAV_VTOL_STATE_FW = 4,
3774}
3775impl MavVtolState {
3776    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3777}
3778impl Default for MavVtolState {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3784impl MavWinchStatusFlag {
3785    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3786}
3787impl Default for MavWinchStatusFlag {
3788    fn default() -> Self {
3789        Self::DEFAULT
3790    }
3791}
3792#[cfg_attr(feature = "ts", derive(TS))]
3793#[cfg_attr(feature = "ts", ts(export))]
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799pub enum MavlinkDataStreamType {
3800    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3801    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3802    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3803    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3804    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3805    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3806}
3807impl MavlinkDataStreamType {
3808    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3809}
3810impl Default for MavlinkDataStreamType {
3811    fn default() -> Self {
3812        Self::DEFAULT
3813    }
3814}
3815#[cfg_attr(feature = "ts", derive(TS))]
3816#[cfg_attr(feature = "ts", ts(export))]
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3823pub enum MissionState {
3824    #[doc = "The mission status reporting is not supported."]
3825    MISSION_STATE_UNKNOWN = 0,
3826    #[doc = "No mission on the vehicle."]
3827    MISSION_STATE_NO_MISSION = 1,
3828    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3829    MISSION_STATE_NOT_STARTED = 2,
3830    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3831    MISSION_STATE_ACTIVE = 3,
3832    #[doc = "Mission is paused when in auto mode."]
3833    MISSION_STATE_PAUSED = 4,
3834    #[doc = "Mission has executed all mission items."]
3835    MISSION_STATE_COMPLETE = 5,
3836}
3837impl MissionState {
3838    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3839}
3840impl Default for MissionState {
3841    fn default() -> Self {
3842        Self::DEFAULT
3843    }
3844}
3845#[cfg_attr(feature = "ts", derive(TS))]
3846#[cfg_attr(feature = "ts", ts(export))]
3847#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3849#[cfg_attr(feature = "serde", serde(tag = "type"))]
3850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3851#[repr(u32)]
3852#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3853pub enum MotorTestOrder {
3854    #[doc = "Default autopilot motor test method."]
3855    MOTOR_TEST_ORDER_DEFAULT = 0,
3856    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3857    MOTOR_TEST_ORDER_SEQUENCE = 1,
3858    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3859    MOTOR_TEST_ORDER_BOARD = 2,
3860}
3861impl MotorTestOrder {
3862    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3863}
3864impl Default for MotorTestOrder {
3865    fn default() -> Self {
3866        Self::DEFAULT
3867    }
3868}
3869#[cfg_attr(feature = "ts", derive(TS))]
3870#[cfg_attr(feature = "ts", ts(export))]
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3877pub enum MotorTestThrottleType {
3878    #[doc = "Throttle as a percentage (0 ~ 100)"]
3879    MOTOR_TEST_THROTTLE_PERCENT = 0,
3880    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3881    MOTOR_TEST_THROTTLE_PWM = 1,
3882    #[doc = "Throttle pass-through from pilot's transmitter."]
3883    MOTOR_TEST_THROTTLE_PILOT = 2,
3884    #[doc = "Per-motor compass calibration test."]
3885    MOTOR_TEST_COMPASS_CAL = 3,
3886}
3887impl MotorTestThrottleType {
3888    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3889}
3890impl Default for MotorTestThrottleType {
3891    fn default() -> Self {
3892        Self::DEFAULT
3893    }
3894}
3895#[cfg_attr(feature = "ts", derive(TS))]
3896#[cfg_attr(feature = "ts", ts(export))]
3897#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3899#[cfg_attr(feature = "serde", serde(tag = "type"))]
3900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3901#[repr(u32)]
3902pub enum NavVtolLandOptions {
3903    #[doc = "Default autopilot landing behaviour."]
3904    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3905    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3906    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3907    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3908    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3909}
3910impl NavVtolLandOptions {
3911    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3912}
3913impl Default for NavVtolLandOptions {
3914    fn default() -> Self {
3915        Self::DEFAULT
3916    }
3917}
3918#[cfg_attr(feature = "ts", derive(TS))]
3919#[cfg_attr(feature = "ts", ts(export))]
3920#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3921#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3922#[cfg_attr(feature = "serde", serde(tag = "type"))]
3923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3924#[repr(u32)]
3925#[doc = "Yaw behaviour during orbit flight."]
3926pub enum OrbitYawBehaviour {
3927    #[doc = "Vehicle front points to the center (default)."]
3928    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3929    #[doc = "Vehicle front holds heading when message received."]
3930    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3931    #[doc = "Yaw uncontrolled."]
3932    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3933    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3934    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3935    #[doc = "Yaw controlled by RC input."]
3936    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3937    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3938    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3939}
3940impl OrbitYawBehaviour {
3941    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3942}
3943impl Default for OrbitYawBehaviour {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[cfg_attr(feature = "ts", derive(TS))]
3949#[cfg_attr(feature = "ts", ts(export))]
3950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3952#[cfg_attr(feature = "serde", serde(tag = "type"))]
3953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3954#[repr(u32)]
3955#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3956pub enum ParachuteAction {
3957    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3958    PARACHUTE_DISABLE = 0,
3959    #[doc = "Enable auto-release of parachute."]
3960    PARACHUTE_ENABLE = 1,
3961    #[doc = "Release parachute and kill motors."]
3962    PARACHUTE_RELEASE = 2,
3963}
3964impl ParachuteAction {
3965    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3966}
3967impl Default for ParachuteAction {
3968    fn default() -> Self {
3969        Self::DEFAULT
3970    }
3971}
3972#[cfg_attr(feature = "ts", derive(TS))]
3973#[cfg_attr(feature = "ts", ts(export))]
3974#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3976#[cfg_attr(feature = "serde", serde(tag = "type"))]
3977#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3978#[repr(u32)]
3979#[doc = "Result from PARAM_EXT_SET message."]
3980pub enum ParamAck {
3981    #[doc = "Parameter value ACCEPTED and SET"]
3982    PARAM_ACK_ACCEPTED = 0,
3983    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3984    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3985    #[doc = "Parameter failed to set"]
3986    PARAM_ACK_FAILED = 2,
3987    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3988    PARAM_ACK_IN_PROGRESS = 3,
3989}
3990impl ParamAck {
3991    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3992}
3993impl Default for ParamAck {
3994    fn default() -> Self {
3995        Self::DEFAULT
3996    }
3997}
3998bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3999impl PositionTargetTypemask {
4000    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4001}
4002impl Default for PositionTargetTypemask {
4003    fn default() -> Self {
4004        Self::DEFAULT
4005    }
4006}
4007#[cfg_attr(feature = "ts", derive(TS))]
4008#[cfg_attr(feature = "ts", ts(export))]
4009#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4011#[cfg_attr(feature = "serde", serde(tag = "type"))]
4012#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4013#[repr(u32)]
4014#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4015pub enum PrecisionLandMode {
4016    #[doc = "Normal (non-precision) landing."]
4017    PRECISION_LAND_MODE_DISABLED = 0,
4018    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4019    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4020    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4021    PRECISION_LAND_MODE_REQUIRED = 2,
4022}
4023impl PrecisionLandMode {
4024    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4025}
4026impl Default for PrecisionLandMode {
4027    fn default() -> Self {
4028        Self::DEFAULT
4029    }
4030}
4031#[cfg_attr(feature = "ts", derive(TS))]
4032#[cfg_attr(feature = "ts", ts(export))]
4033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4035#[cfg_attr(feature = "serde", serde(tag = "type"))]
4036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4037#[repr(u32)]
4038#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4039pub enum PreflightStorageMissionAction {
4040    #[doc = "Read current mission data from persistent storage"]
4041    MISSION_READ_PERSISTENT = 0,
4042    #[doc = "Write current mission data to persistent storage"]
4043    MISSION_WRITE_PERSISTENT = 1,
4044    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4045    MISSION_RESET_DEFAULT = 2,
4046}
4047impl PreflightStorageMissionAction {
4048    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4049}
4050impl Default for PreflightStorageMissionAction {
4051    fn default() -> Self {
4052        Self::DEFAULT
4053    }
4054}
4055#[cfg_attr(feature = "ts", derive(TS))]
4056#[cfg_attr(feature = "ts", ts(export))]
4057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4059#[cfg_attr(feature = "serde", serde(tag = "type"))]
4060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4061#[repr(u32)]
4062#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4063pub enum PreflightStorageParameterAction {
4064    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4065    PARAM_READ_PERSISTENT = 0,
4066    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4067    PARAM_WRITE_PERSISTENT = 1,
4068    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4069    PARAM_RESET_CONFIG_DEFAULT = 2,
4070    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4071    PARAM_RESET_SENSOR_DEFAULT = 3,
4072    #[doc = "Reset all parameters, including operation counters, to default values"]
4073    PARAM_RESET_ALL_DEFAULT = 4,
4074}
4075impl PreflightStorageParameterAction {
4076    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4077}
4078impl Default for PreflightStorageParameterAction {
4079    fn default() -> Self {
4080        Self::DEFAULT
4081    }
4082}
4083#[cfg_attr(feature = "ts", derive(TS))]
4084#[cfg_attr(feature = "ts", ts(export))]
4085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "serde", serde(tag = "type"))]
4088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4089#[repr(u32)]
4090#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4091pub enum RcSubType {
4092    #[doc = "Spektrum DSM2"]
4093    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4094    #[doc = "Spektrum DSMX"]
4095    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4096    #[doc = "Spektrum DSMX8"]
4097    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4098}
4099impl RcSubType {
4100    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4101}
4102impl Default for RcSubType {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4115pub enum RcType {
4116    #[doc = "Spektrum"]
4117    RC_TYPE_SPEKTRUM = 0,
4118    #[doc = "CRSF"]
4119    RC_TYPE_CRSF = 1,
4120}
4121impl RcType {
4122    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4123}
4124impl Default for RcType {
4125    fn default() -> Self {
4126        Self::DEFAULT
4127    }
4128}
4129#[cfg_attr(feature = "ts", derive(TS))]
4130#[cfg_attr(feature = "ts", ts(export))]
4131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4133#[cfg_attr(feature = "serde", serde(tag = "type"))]
4134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4135#[repr(u32)]
4136#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4137pub enum RebootShutdownConditions {
4138    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4139    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4140    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4141    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4142}
4143impl RebootShutdownConditions {
4144    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4145}
4146impl Default for RebootShutdownConditions {
4147    fn default() -> Self {
4148        Self::DEFAULT
4149    }
4150}
4151#[cfg_attr(feature = "ts", derive(TS))]
4152#[cfg_attr(feature = "ts", ts(export))]
4153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4155#[cfg_attr(feature = "serde", serde(tag = "type"))]
4156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4157#[repr(u32)]
4158#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4159pub enum RtkBaselineCoordinateSystem {
4160    #[doc = "Earth-centered, Earth-fixed"]
4161    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4162    #[doc = "RTK basestation centered, north, east, down"]
4163    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4164}
4165impl RtkBaselineCoordinateSystem {
4166    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4167}
4168impl Default for RtkBaselineCoordinateSystem {
4169    fn default() -> Self {
4170        Self::DEFAULT
4171    }
4172}
4173#[cfg_attr(feature = "ts", derive(TS))]
4174#[cfg_attr(feature = "ts", ts(export))]
4175#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4176#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4177#[cfg_attr(feature = "serde", serde(tag = "type"))]
4178#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4179#[repr(u32)]
4180#[doc = "Possible safety switch states."]
4181pub enum SafetySwitchState {
4182    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4183    SAFETY_SWITCH_STATE_SAFE = 0,
4184    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4185    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4186}
4187impl SafetySwitchState {
4188    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4189}
4190impl Default for SafetySwitchState {
4191    fn default() -> Self {
4192        Self::DEFAULT
4193    }
4194}
4195#[cfg_attr(feature = "ts", derive(TS))]
4196#[cfg_attr(feature = "ts", ts(export))]
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "SERIAL_CONTROL device types"]
4203pub enum SerialControlDev {
4204    #[doc = "First telemetry port"]
4205    SERIAL_CONTROL_DEV_TELEM1 = 0,
4206    #[doc = "Second telemetry port"]
4207    SERIAL_CONTROL_DEV_TELEM2 = 1,
4208    #[doc = "First GPS port"]
4209    SERIAL_CONTROL_DEV_GPS1 = 2,
4210    #[doc = "Second GPS port"]
4211    SERIAL_CONTROL_DEV_GPS2 = 3,
4212    #[doc = "system shell"]
4213    SERIAL_CONTROL_DEV_SHELL = 10,
4214    #[doc = "SERIAL0"]
4215    SERIAL_CONTROL_SERIAL0 = 100,
4216    #[doc = "SERIAL1"]
4217    SERIAL_CONTROL_SERIAL1 = 101,
4218    #[doc = "SERIAL2"]
4219    SERIAL_CONTROL_SERIAL2 = 102,
4220    #[doc = "SERIAL3"]
4221    SERIAL_CONTROL_SERIAL3 = 103,
4222    #[doc = "SERIAL4"]
4223    SERIAL_CONTROL_SERIAL4 = 104,
4224    #[doc = "SERIAL5"]
4225    SERIAL_CONTROL_SERIAL5 = 105,
4226    #[doc = "SERIAL6"]
4227    SERIAL_CONTROL_SERIAL6 = 106,
4228    #[doc = "SERIAL7"]
4229    SERIAL_CONTROL_SERIAL7 = 107,
4230    #[doc = "SERIAL8"]
4231    SERIAL_CONTROL_SERIAL8 = 108,
4232    #[doc = "SERIAL9"]
4233    SERIAL_CONTROL_SERIAL9 = 109,
4234}
4235impl SerialControlDev {
4236    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4237}
4238impl Default for SerialControlDev {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4244impl SerialControlFlag {
4245    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4246}
4247impl Default for SerialControlFlag {
4248    fn default() -> Self {
4249        Self::DEFAULT
4250    }
4251}
4252#[cfg_attr(feature = "ts", derive(TS))]
4253#[cfg_attr(feature = "ts", ts(export))]
4254#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4256#[cfg_attr(feature = "serde", serde(tag = "type"))]
4257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4258#[repr(u32)]
4259#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4260pub enum SetFocusType {
4261    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4262    FOCUS_TYPE_STEP = 0,
4263    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4264    FOCUS_TYPE_CONTINUOUS = 1,
4265    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4266    FOCUS_TYPE_RANGE = 2,
4267    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4268    FOCUS_TYPE_METERS = 3,
4269    #[doc = "Focus automatically."]
4270    FOCUS_TYPE_AUTO = 4,
4271    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4272    FOCUS_TYPE_AUTO_SINGLE = 5,
4273    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4274    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4275}
4276impl SetFocusType {
4277    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4278}
4279impl Default for SetFocusType {
4280    fn default() -> Self {
4281        Self::DEFAULT
4282    }
4283}
4284#[cfg_attr(feature = "ts", derive(TS))]
4285#[cfg_attr(feature = "ts", ts(export))]
4286#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4287#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4288#[cfg_attr(feature = "serde", serde(tag = "type"))]
4289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4290#[repr(u32)]
4291#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4292pub enum SpeedType {
4293    #[doc = "Airspeed"]
4294    SPEED_TYPE_AIRSPEED = 0,
4295    #[doc = "Groundspeed"]
4296    SPEED_TYPE_GROUNDSPEED = 1,
4297    #[doc = "Climb speed"]
4298    SPEED_TYPE_CLIMB_SPEED = 2,
4299    #[doc = "Descent speed"]
4300    SPEED_TYPE_DESCENT_SPEED = 3,
4301}
4302impl SpeedType {
4303    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4304}
4305impl Default for SpeedType {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[cfg_attr(feature = "ts", derive(TS))]
4311#[cfg_attr(feature = "ts", ts(export))]
4312#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4314#[cfg_attr(feature = "serde", serde(tag = "type"))]
4315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4316#[repr(u32)]
4317#[doc = "Flags to indicate the status of camera storage."]
4318pub enum StorageStatus {
4319    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4320    STORAGE_STATUS_EMPTY = 0,
4321    #[doc = "Storage present but unformatted."]
4322    STORAGE_STATUS_UNFORMATTED = 1,
4323    #[doc = "Storage present and ready."]
4324    STORAGE_STATUS_READY = 2,
4325    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4326    STORAGE_STATUS_NOT_SUPPORTED = 3,
4327}
4328impl StorageStatus {
4329    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4330}
4331impl Default for StorageStatus {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[cfg_attr(feature = "ts", derive(TS))]
4337#[cfg_attr(feature = "ts", ts(export))]
4338#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4340#[cfg_attr(feature = "serde", serde(tag = "type"))]
4341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4342#[repr(u32)]
4343#[doc = "Flags to indicate the type of storage."]
4344pub enum StorageType {
4345    #[doc = "Storage type is not known."]
4346    STORAGE_TYPE_UNKNOWN = 0,
4347    #[doc = "Storage type is USB device."]
4348    STORAGE_TYPE_USB_STICK = 1,
4349    #[doc = "Storage type is SD card."]
4350    STORAGE_TYPE_SD = 2,
4351    #[doc = "Storage type is microSD card."]
4352    STORAGE_TYPE_MICROSD = 3,
4353    #[doc = "Storage type is CFast."]
4354    STORAGE_TYPE_CF = 4,
4355    #[doc = "Storage type is CFexpress."]
4356    STORAGE_TYPE_CFE = 5,
4357    #[doc = "Storage type is XQD."]
4358    STORAGE_TYPE_XQD = 6,
4359    #[doc = "Storage type is HD mass storage type."]
4360    STORAGE_TYPE_HD = 7,
4361    #[doc = "Storage type is other, not listed type."]
4362    STORAGE_TYPE_OTHER = 254,
4363}
4364impl StorageType {
4365    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4366}
4367impl Default for StorageType {
4368    fn default() -> Self {
4369        Self::DEFAULT
4370    }
4371}
4372bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4373impl StorageUsageFlag {
4374    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4375}
4376impl Default for StorageUsageFlag {
4377    fn default() -> Self {
4378        Self::DEFAULT
4379    }
4380}
4381#[cfg_attr(feature = "ts", derive(TS))]
4382#[cfg_attr(feature = "ts", ts(export))]
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4389pub enum TuneFormat {
4390    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4391    TUNE_FORMAT_QBASIC1_1 = 1,
4392    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4393    TUNE_FORMAT_MML_MODERN = 2,
4394}
4395impl TuneFormat {
4396    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4397}
4398impl Default for TuneFormat {
4399    fn default() -> Self {
4400        Self::DEFAULT
4401    }
4402}
4403#[cfg_attr(feature = "ts", derive(TS))]
4404#[cfg_attr(feature = "ts", ts(export))]
4405#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4407#[cfg_attr(feature = "serde", serde(tag = "type"))]
4408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4409#[repr(u32)]
4410#[doc = "Generalized UAVCAN node health"]
4411pub enum UavcanNodeHealth {
4412    #[doc = "The node is functioning properly."]
4413    UAVCAN_NODE_HEALTH_OK = 0,
4414    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4415    UAVCAN_NODE_HEALTH_WARNING = 1,
4416    #[doc = "The node has encountered a major failure."]
4417    UAVCAN_NODE_HEALTH_ERROR = 2,
4418    #[doc = "The node has suffered a fatal malfunction."]
4419    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4420}
4421impl UavcanNodeHealth {
4422    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4423}
4424impl Default for UavcanNodeHealth {
4425    fn default() -> Self {
4426        Self::DEFAULT
4427    }
4428}
4429#[cfg_attr(feature = "ts", derive(TS))]
4430#[cfg_attr(feature = "ts", ts(export))]
4431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4433#[cfg_attr(feature = "serde", serde(tag = "type"))]
4434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4435#[repr(u32)]
4436#[doc = "Generalized UAVCAN node mode"]
4437pub enum UavcanNodeMode {
4438    #[doc = "The node is performing its primary functions."]
4439    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4440    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4441    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4442    #[doc = "The node is under maintenance."]
4443    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4444    #[doc = "The node is in the process of updating its software."]
4445    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4446    #[doc = "The node is no longer available online."]
4447    UAVCAN_NODE_MODE_OFFLINE = 7,
4448}
4449impl UavcanNodeMode {
4450    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4451}
4452impl Default for UavcanNodeMode {
4453    fn default() -> Self {
4454        Self::DEFAULT
4455    }
4456}
4457bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4458impl UtmDataAvailFlags {
4459    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4460}
4461impl Default for UtmDataAvailFlags {
4462    fn default() -> Self {
4463        Self::DEFAULT
4464    }
4465}
4466#[cfg_attr(feature = "ts", derive(TS))]
4467#[cfg_attr(feature = "ts", ts(export))]
4468#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4470#[cfg_attr(feature = "serde", serde(tag = "type"))]
4471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4472#[repr(u32)]
4473#[doc = "Airborne status of UAS."]
4474pub enum UtmFlightState {
4475    #[doc = "The flight state can't be determined."]
4476    UTM_FLIGHT_STATE_UNKNOWN = 1,
4477    #[doc = "UAS on ground."]
4478    UTM_FLIGHT_STATE_GROUND = 2,
4479    #[doc = "UAS airborne."]
4480    UTM_FLIGHT_STATE_AIRBORNE = 3,
4481    #[doc = "UAS is in an emergency flight state."]
4482    UTM_FLIGHT_STATE_EMERGENCY = 16,
4483    #[doc = "UAS has no active controls."]
4484    UTM_FLIGHT_STATE_NOCTRL = 32,
4485}
4486impl UtmFlightState {
4487    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4488}
4489impl Default for UtmFlightState {
4490    fn default() -> Self {
4491        Self::DEFAULT
4492    }
4493}
4494#[cfg_attr(feature = "ts", derive(TS))]
4495#[cfg_attr(feature = "ts", ts(export))]
4496#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4498#[cfg_attr(feature = "serde", serde(tag = "type"))]
4499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4500#[repr(u32)]
4501#[doc = "Video stream encodings"]
4502pub enum VideoStreamEncoding {
4503    #[doc = "Stream encoding is unknown"]
4504    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4505    #[doc = "Stream encoding is H.264"]
4506    VIDEO_STREAM_ENCODING_H264 = 1,
4507    #[doc = "Stream encoding is H.265"]
4508    VIDEO_STREAM_ENCODING_H265 = 2,
4509}
4510impl VideoStreamEncoding {
4511    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4512}
4513impl Default for VideoStreamEncoding {
4514    fn default() -> Self {
4515        Self::DEFAULT
4516    }
4517}
4518bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4519impl VideoStreamStatusFlags {
4520    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4521}
4522impl Default for VideoStreamStatusFlags {
4523    fn default() -> Self {
4524        Self::DEFAULT
4525    }
4526}
4527#[cfg_attr(feature = "ts", derive(TS))]
4528#[cfg_attr(feature = "ts", ts(export))]
4529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4531#[cfg_attr(feature = "serde", serde(tag = "type"))]
4532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4533#[repr(u32)]
4534#[doc = "Video stream types"]
4535pub enum VideoStreamType {
4536    #[doc = "Stream is RTSP"]
4537    VIDEO_STREAM_TYPE_RTSP = 0,
4538    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4539    VIDEO_STREAM_TYPE_RTPUDP = 1,
4540    #[doc = "Stream is MPEG on TCP"]
4541    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4542    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4543    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4544}
4545impl VideoStreamType {
4546    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4547}
4548impl Default for VideoStreamType {
4549    fn default() -> Self {
4550        Self::DEFAULT
4551    }
4552}
4553#[cfg_attr(feature = "ts", derive(TS))]
4554#[cfg_attr(feature = "ts", ts(export))]
4555#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4557#[cfg_attr(feature = "serde", serde(tag = "type"))]
4558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4559#[repr(u32)]
4560#[doc = "Direction of VTOL transition"]
4561pub enum VtolTransitionHeading {
4562    #[doc = "Respect the heading configuration of the vehicle."]
4563    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4564    #[doc = "Use the heading pointing towards the next waypoint."]
4565    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4566    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4567    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4568    #[doc = "Use the specified heading in parameter 4."]
4569    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4570    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4571    VTOL_TRANSITION_HEADING_ANY = 4,
4572}
4573impl VtolTransitionHeading {
4574    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4575}
4576impl Default for VtolTransitionHeading {
4577    fn default() -> Self {
4578        Self::DEFAULT
4579    }
4580}
4581#[cfg_attr(feature = "ts", derive(TS))]
4582#[cfg_attr(feature = "ts", ts(export))]
4583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4585#[cfg_attr(feature = "serde", serde(tag = "type"))]
4586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4587#[repr(u32)]
4588#[doc = "WiFi Mode."]
4589pub enum WifiConfigApMode {
4590    #[doc = "WiFi mode is undefined."]
4591    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4592    #[doc = "WiFi configured as an access point."]
4593    WIFI_CONFIG_AP_MODE_AP = 1,
4594    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4595    WIFI_CONFIG_AP_MODE_STATION = 2,
4596    #[doc = "WiFi disabled."]
4597    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4598}
4599impl WifiConfigApMode {
4600    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4601}
4602impl Default for WifiConfigApMode {
4603    fn default() -> Self {
4604        Self::DEFAULT
4605    }
4606}
4607#[cfg_attr(feature = "ts", derive(TS))]
4608#[cfg_attr(feature = "ts", ts(export))]
4609#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4611#[cfg_attr(feature = "serde", serde(tag = "type"))]
4612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4613#[repr(u32)]
4614#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4615pub enum WifiConfigApResponse {
4616    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4617    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4618    #[doc = "Changes accepted."]
4619    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4620    #[doc = "Changes rejected."]
4621    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4622    #[doc = "Invalid Mode."]
4623    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4624    #[doc = "Invalid SSID."]
4625    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4626    #[doc = "Invalid Password."]
4627    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4628}
4629impl WifiConfigApResponse {
4630    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4631}
4632impl Default for WifiConfigApResponse {
4633    fn default() -> Self {
4634        Self::DEFAULT
4635    }
4636}
4637#[cfg_attr(feature = "ts", derive(TS))]
4638#[cfg_attr(feature = "ts", ts(export))]
4639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4641#[cfg_attr(feature = "serde", serde(tag = "type"))]
4642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4643#[repr(u32)]
4644#[doc = "Winch actions."]
4645pub enum WinchActions {
4646    #[doc = "Allow motor to freewheel."]
4647    WINCH_RELAXED = 0,
4648    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4649    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4650    #[doc = "Wind or unwind line at specified rate."]
4651    WINCH_RATE_CONTROL = 2,
4652    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4653    WINCH_LOCK = 3,
4654    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4655    WINCH_DELIVER = 4,
4656    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4657    WINCH_HOLD = 5,
4658    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4659    WINCH_RETRACT = 6,
4660    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4661    WINCH_LOAD_LINE = 7,
4662    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4663    WINCH_ABANDON_LINE = 8,
4664    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4665    WINCH_LOAD_PAYLOAD = 9,
4666}
4667impl WinchActions {
4668    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4669}
4670impl Default for WinchActions {
4671    fn default() -> Self {
4672        Self::DEFAULT
4673    }
4674}
4675#[doc = "Set the vehicle attitude and body angular rates."]
4676#[doc = ""]
4677#[doc = "ID: 140"]
4678#[derive(Debug, Clone, PartialEq)]
4679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4680#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4681#[cfg_attr(feature = "ts", derive(TS))]
4682#[cfg_attr(feature = "ts", ts(export))]
4683pub struct ACTUATOR_CONTROL_TARGET_DATA {
4684    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4685    pub time_usec: u64,
4686    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4689    pub controls: [f32; 8],
4690    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4691    pub group_mlx: u8,
4692}
4693impl ACTUATOR_CONTROL_TARGET_DATA {
4694    pub const ENCODED_LEN: usize = 41usize;
4695    pub const DEFAULT: Self = Self {
4696        time_usec: 0_u64,
4697        controls: [0.0_f32; 8usize],
4698        group_mlx: 0_u8,
4699    };
4700    #[cfg(feature = "arbitrary")]
4701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4702        use arbitrary::{Arbitrary, Unstructured};
4703        let mut buf = [0u8; 1024];
4704        rng.fill_bytes(&mut buf);
4705        let mut unstructured = Unstructured::new(&buf);
4706        Self::arbitrary(&mut unstructured).unwrap_or_default()
4707    }
4708}
4709impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4710    fn default() -> Self {
4711        Self::DEFAULT.clone()
4712    }
4713}
4714impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4715    type Message = MavMessage;
4716    const ID: u32 = 140u32;
4717    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4718    const EXTRA_CRC: u8 = 181u8;
4719    const ENCODED_LEN: usize = 41usize;
4720    fn deser(
4721        _version: MavlinkVersion,
4722        __input: &[u8],
4723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4724        let avail_len = __input.len();
4725        let mut payload_buf = [0; Self::ENCODED_LEN];
4726        let mut buf = if avail_len < Self::ENCODED_LEN {
4727            payload_buf[0..avail_len].copy_from_slice(__input);
4728            Bytes::new(&payload_buf)
4729        } else {
4730            Bytes::new(__input)
4731        };
4732        let mut __struct = Self::default();
4733        __struct.time_usec = buf.get_u64_le();
4734        for v in &mut __struct.controls {
4735            let val = buf.get_f32_le();
4736            *v = val;
4737        }
4738        __struct.group_mlx = buf.get_u8();
4739        Ok(__struct)
4740    }
4741    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4742        let mut __tmp = BytesMut::new(bytes);
4743        #[allow(clippy::absurd_extreme_comparisons)]
4744        #[allow(unused_comparisons)]
4745        if __tmp.remaining() < Self::ENCODED_LEN {
4746            panic!(
4747                "buffer is too small (need {} bytes, but got {})",
4748                Self::ENCODED_LEN,
4749                __tmp.remaining(),
4750            )
4751        }
4752        __tmp.put_u64_le(self.time_usec);
4753        for val in &self.controls {
4754            __tmp.put_f32_le(*val);
4755        }
4756        __tmp.put_u8(self.group_mlx);
4757        if matches!(version, MavlinkVersion::V2) {
4758            let len = __tmp.len();
4759            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4760        } else {
4761            __tmp.len()
4762        }
4763    }
4764}
4765#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4766#[doc = ""]
4767#[doc = "ID: 375"]
4768#[derive(Debug, Clone, PartialEq)]
4769#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4770#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4771#[cfg_attr(feature = "ts", derive(TS))]
4772#[cfg_attr(feature = "ts", ts(export))]
4773pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4774    #[doc = "Timestamp (since system boot)."]
4775    pub time_usec: u64,
4776    #[doc = "Active outputs"]
4777    pub active: u32,
4778    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4779    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4780    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4781    pub actuator: [f32; 32],
4782}
4783impl ACTUATOR_OUTPUT_STATUS_DATA {
4784    pub const ENCODED_LEN: usize = 140usize;
4785    pub const DEFAULT: Self = Self {
4786        time_usec: 0_u64,
4787        active: 0_u32,
4788        actuator: [0.0_f32; 32usize],
4789    };
4790    #[cfg(feature = "arbitrary")]
4791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4792        use arbitrary::{Arbitrary, Unstructured};
4793        let mut buf = [0u8; 1024];
4794        rng.fill_bytes(&mut buf);
4795        let mut unstructured = Unstructured::new(&buf);
4796        Self::arbitrary(&mut unstructured).unwrap_or_default()
4797    }
4798}
4799impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4800    fn default() -> Self {
4801        Self::DEFAULT.clone()
4802    }
4803}
4804impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4805    type Message = MavMessage;
4806    const ID: u32 = 375u32;
4807    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4808    const EXTRA_CRC: u8 = 251u8;
4809    const ENCODED_LEN: usize = 140usize;
4810    fn deser(
4811        _version: MavlinkVersion,
4812        __input: &[u8],
4813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4814        let avail_len = __input.len();
4815        let mut payload_buf = [0; Self::ENCODED_LEN];
4816        let mut buf = if avail_len < Self::ENCODED_LEN {
4817            payload_buf[0..avail_len].copy_from_slice(__input);
4818            Bytes::new(&payload_buf)
4819        } else {
4820            Bytes::new(__input)
4821        };
4822        let mut __struct = Self::default();
4823        __struct.time_usec = buf.get_u64_le();
4824        __struct.active = buf.get_u32_le();
4825        for v in &mut __struct.actuator {
4826            let val = buf.get_f32_le();
4827            *v = val;
4828        }
4829        Ok(__struct)
4830    }
4831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4832        let mut __tmp = BytesMut::new(bytes);
4833        #[allow(clippy::absurd_extreme_comparisons)]
4834        #[allow(unused_comparisons)]
4835        if __tmp.remaining() < Self::ENCODED_LEN {
4836            panic!(
4837                "buffer is too small (need {} bytes, but got {})",
4838                Self::ENCODED_LEN,
4839                __tmp.remaining(),
4840            )
4841        }
4842        __tmp.put_u64_le(self.time_usec);
4843        __tmp.put_u32_le(self.active);
4844        for val in &self.actuator {
4845            __tmp.put_f32_le(*val);
4846        }
4847        if matches!(version, MavlinkVersion::V2) {
4848            let len = __tmp.len();
4849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4850        } else {
4851            __tmp.len()
4852        }
4853    }
4854}
4855#[doc = "The location and information of an ADSB vehicle."]
4856#[doc = ""]
4857#[doc = "ID: 246"]
4858#[derive(Debug, Clone, PartialEq)]
4859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4861#[cfg_attr(feature = "ts", derive(TS))]
4862#[cfg_attr(feature = "ts", ts(export))]
4863pub struct ADSB_VEHICLE_DATA {
4864    #[doc = "ICAO address"]
4865    pub ICAO_address: u32,
4866    #[doc = "Latitude"]
4867    pub lat: i32,
4868    #[doc = "Longitude"]
4869    pub lon: i32,
4870    #[doc = "Altitude(ASL)"]
4871    pub altitude: i32,
4872    #[doc = "Course over ground"]
4873    pub heading: u16,
4874    #[doc = "The horizontal velocity"]
4875    pub hor_velocity: u16,
4876    #[doc = "The vertical velocity. Positive is up"]
4877    pub ver_velocity: i16,
4878    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4879    pub flags: AdsbFlags,
4880    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4881    pub squawk: u16,
4882    #[doc = "ADSB altitude type."]
4883    pub altitude_type: AdsbAltitudeType,
4884    #[doc = "The callsign, 8+null"]
4885    #[cfg_attr(feature = "ts", ts(type = "string"))]
4886    pub callsign: CharArray<9>,
4887    #[doc = "ADSB emitter type."]
4888    pub emitter_type: AdsbEmitterType,
4889    #[doc = "Time since last communication in seconds"]
4890    pub tslc: u8,
4891}
4892impl ADSB_VEHICLE_DATA {
4893    pub const ENCODED_LEN: usize = 38usize;
4894    pub const DEFAULT: Self = Self {
4895        ICAO_address: 0_u32,
4896        lat: 0_i32,
4897        lon: 0_i32,
4898        altitude: 0_i32,
4899        heading: 0_u16,
4900        hor_velocity: 0_u16,
4901        ver_velocity: 0_i16,
4902        flags: AdsbFlags::DEFAULT,
4903        squawk: 0_u16,
4904        altitude_type: AdsbAltitudeType::DEFAULT,
4905        callsign: CharArray::new([0_u8; 9usize]),
4906        emitter_type: AdsbEmitterType::DEFAULT,
4907        tslc: 0_u8,
4908    };
4909    #[cfg(feature = "arbitrary")]
4910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4911        use arbitrary::{Arbitrary, Unstructured};
4912        let mut buf = [0u8; 1024];
4913        rng.fill_bytes(&mut buf);
4914        let mut unstructured = Unstructured::new(&buf);
4915        Self::arbitrary(&mut unstructured).unwrap_or_default()
4916    }
4917}
4918impl Default for ADSB_VEHICLE_DATA {
4919    fn default() -> Self {
4920        Self::DEFAULT.clone()
4921    }
4922}
4923impl MessageData for ADSB_VEHICLE_DATA {
4924    type Message = MavMessage;
4925    const ID: u32 = 246u32;
4926    const NAME: &'static str = "ADSB_VEHICLE";
4927    const EXTRA_CRC: u8 = 184u8;
4928    const ENCODED_LEN: usize = 38usize;
4929    fn deser(
4930        _version: MavlinkVersion,
4931        __input: &[u8],
4932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4933        let avail_len = __input.len();
4934        let mut payload_buf = [0; Self::ENCODED_LEN];
4935        let mut buf = if avail_len < Self::ENCODED_LEN {
4936            payload_buf[0..avail_len].copy_from_slice(__input);
4937            Bytes::new(&payload_buf)
4938        } else {
4939            Bytes::new(__input)
4940        };
4941        let mut __struct = Self::default();
4942        __struct.ICAO_address = buf.get_u32_le();
4943        __struct.lat = buf.get_i32_le();
4944        __struct.lon = buf.get_i32_le();
4945        __struct.altitude = buf.get_i32_le();
4946        __struct.heading = buf.get_u16_le();
4947        __struct.hor_velocity = buf.get_u16_le();
4948        __struct.ver_velocity = buf.get_i16_le();
4949        let tmp = buf.get_u16_le();
4950        __struct.flags =
4951            AdsbFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
4952                flag_type: "AdsbFlags",
4953                value: tmp as u64,
4954            })?;
4955        __struct.squawk = buf.get_u16_le();
4956        let tmp = buf.get_u8();
4957        __struct.altitude_type =
4958            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4959                enum_type: "AdsbAltitudeType",
4960                value: tmp as u64,
4961            })?;
4962        let mut tmp = [0_u8; 9usize];
4963        for v in &mut tmp {
4964            *v = buf.get_u8();
4965        }
4966        __struct.callsign = CharArray::new(tmp);
4967        let tmp = buf.get_u8();
4968        __struct.emitter_type =
4969            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4970                enum_type: "AdsbEmitterType",
4971                value: tmp as u64,
4972            })?;
4973        __struct.tslc = buf.get_u8();
4974        Ok(__struct)
4975    }
4976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4977        let mut __tmp = BytesMut::new(bytes);
4978        #[allow(clippy::absurd_extreme_comparisons)]
4979        #[allow(unused_comparisons)]
4980        if __tmp.remaining() < Self::ENCODED_LEN {
4981            panic!(
4982                "buffer is too small (need {} bytes, but got {})",
4983                Self::ENCODED_LEN,
4984                __tmp.remaining(),
4985            )
4986        }
4987        __tmp.put_u32_le(self.ICAO_address);
4988        __tmp.put_i32_le(self.lat);
4989        __tmp.put_i32_le(self.lon);
4990        __tmp.put_i32_le(self.altitude);
4991        __tmp.put_u16_le(self.heading);
4992        __tmp.put_u16_le(self.hor_velocity);
4993        __tmp.put_i16_le(self.ver_velocity);
4994        __tmp.put_u16_le(self.flags.bits());
4995        __tmp.put_u16_le(self.squawk);
4996        __tmp.put_u8(self.altitude_type as u8);
4997        for val in &self.callsign {
4998            __tmp.put_u8(*val);
4999        }
5000        __tmp.put_u8(self.emitter_type as u8);
5001        __tmp.put_u8(self.tslc);
5002        if matches!(version, MavlinkVersion::V2) {
5003            let len = __tmp.len();
5004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5005        } else {
5006            __tmp.len()
5007        }
5008    }
5009}
5010#[doc = "The location and information of an AIS vessel."]
5011#[doc = ""]
5012#[doc = "ID: 301"]
5013#[derive(Debug, Clone, PartialEq)]
5014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5016#[cfg_attr(feature = "ts", derive(TS))]
5017#[cfg_attr(feature = "ts", ts(export))]
5018pub struct AIS_VESSEL_DATA {
5019    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5020    pub MMSI: u32,
5021    #[doc = "Latitude"]
5022    pub lat: i32,
5023    #[doc = "Longitude"]
5024    pub lon: i32,
5025    #[doc = "Course over ground"]
5026    pub COG: u16,
5027    #[doc = "True heading"]
5028    pub heading: u16,
5029    #[doc = "Speed over ground"]
5030    pub velocity: u16,
5031    #[doc = "Distance from lat/lon location to bow"]
5032    pub dimension_bow: u16,
5033    #[doc = "Distance from lat/lon location to stern"]
5034    pub dimension_stern: u16,
5035    #[doc = "Time since last communication in seconds"]
5036    pub tslc: u16,
5037    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5038    pub flags: AisFlags,
5039    #[doc = "Turn rate"]
5040    pub turn_rate: i8,
5041    #[doc = "Navigational status"]
5042    pub navigational_status: AisNavStatus,
5043    #[doc = "Type of vessels"]
5044    pub mavtype: AisType,
5045    #[doc = "Distance from lat/lon location to port side"]
5046    pub dimension_port: u8,
5047    #[doc = "Distance from lat/lon location to starboard side"]
5048    pub dimension_starboard: u8,
5049    #[doc = "The vessel callsign"]
5050    #[cfg_attr(feature = "ts", ts(type = "string"))]
5051    pub callsign: CharArray<7>,
5052    #[doc = "The vessel name"]
5053    #[cfg_attr(feature = "ts", ts(type = "string"))]
5054    pub name: CharArray<20>,
5055}
5056impl AIS_VESSEL_DATA {
5057    pub const ENCODED_LEN: usize = 58usize;
5058    pub const DEFAULT: Self = Self {
5059        MMSI: 0_u32,
5060        lat: 0_i32,
5061        lon: 0_i32,
5062        COG: 0_u16,
5063        heading: 0_u16,
5064        velocity: 0_u16,
5065        dimension_bow: 0_u16,
5066        dimension_stern: 0_u16,
5067        tslc: 0_u16,
5068        flags: AisFlags::DEFAULT,
5069        turn_rate: 0_i8,
5070        navigational_status: AisNavStatus::DEFAULT,
5071        mavtype: AisType::DEFAULT,
5072        dimension_port: 0_u8,
5073        dimension_starboard: 0_u8,
5074        callsign: CharArray::new([0_u8; 7usize]),
5075        name: CharArray::new([0_u8; 20usize]),
5076    };
5077    #[cfg(feature = "arbitrary")]
5078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5079        use arbitrary::{Arbitrary, Unstructured};
5080        let mut buf = [0u8; 1024];
5081        rng.fill_bytes(&mut buf);
5082        let mut unstructured = Unstructured::new(&buf);
5083        Self::arbitrary(&mut unstructured).unwrap_or_default()
5084    }
5085}
5086impl Default for AIS_VESSEL_DATA {
5087    fn default() -> Self {
5088        Self::DEFAULT.clone()
5089    }
5090}
5091impl MessageData for AIS_VESSEL_DATA {
5092    type Message = MavMessage;
5093    const ID: u32 = 301u32;
5094    const NAME: &'static str = "AIS_VESSEL";
5095    const EXTRA_CRC: u8 = 243u8;
5096    const ENCODED_LEN: usize = 58usize;
5097    fn deser(
5098        _version: MavlinkVersion,
5099        __input: &[u8],
5100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5101        let avail_len = __input.len();
5102        let mut payload_buf = [0; Self::ENCODED_LEN];
5103        let mut buf = if avail_len < Self::ENCODED_LEN {
5104            payload_buf[0..avail_len].copy_from_slice(__input);
5105            Bytes::new(&payload_buf)
5106        } else {
5107            Bytes::new(__input)
5108        };
5109        let mut __struct = Self::default();
5110        __struct.MMSI = buf.get_u32_le();
5111        __struct.lat = buf.get_i32_le();
5112        __struct.lon = buf.get_i32_le();
5113        __struct.COG = buf.get_u16_le();
5114        __struct.heading = buf.get_u16_le();
5115        __struct.velocity = buf.get_u16_le();
5116        __struct.dimension_bow = buf.get_u16_le();
5117        __struct.dimension_stern = buf.get_u16_le();
5118        __struct.tslc = buf.get_u16_le();
5119        let tmp = buf.get_u16_le();
5120        __struct.flags =
5121            AisFlags::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5122                flag_type: "AisFlags",
5123                value: tmp as u64,
5124            })?;
5125        __struct.turn_rate = buf.get_i8();
5126        let tmp = buf.get_u8();
5127        __struct.navigational_status =
5128            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5129                enum_type: "AisNavStatus",
5130                value: tmp as u64,
5131            })?;
5132        let tmp = buf.get_u8();
5133        __struct.mavtype =
5134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5135                enum_type: "AisType",
5136                value: tmp as u64,
5137            })?;
5138        __struct.dimension_port = buf.get_u8();
5139        __struct.dimension_starboard = buf.get_u8();
5140        let mut tmp = [0_u8; 7usize];
5141        for v in &mut tmp {
5142            *v = buf.get_u8();
5143        }
5144        __struct.callsign = CharArray::new(tmp);
5145        let mut tmp = [0_u8; 20usize];
5146        for v in &mut tmp {
5147            *v = buf.get_u8();
5148        }
5149        __struct.name = CharArray::new(tmp);
5150        Ok(__struct)
5151    }
5152    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5153        let mut __tmp = BytesMut::new(bytes);
5154        #[allow(clippy::absurd_extreme_comparisons)]
5155        #[allow(unused_comparisons)]
5156        if __tmp.remaining() < Self::ENCODED_LEN {
5157            panic!(
5158                "buffer is too small (need {} bytes, but got {})",
5159                Self::ENCODED_LEN,
5160                __tmp.remaining(),
5161            )
5162        }
5163        __tmp.put_u32_le(self.MMSI);
5164        __tmp.put_i32_le(self.lat);
5165        __tmp.put_i32_le(self.lon);
5166        __tmp.put_u16_le(self.COG);
5167        __tmp.put_u16_le(self.heading);
5168        __tmp.put_u16_le(self.velocity);
5169        __tmp.put_u16_le(self.dimension_bow);
5170        __tmp.put_u16_le(self.dimension_stern);
5171        __tmp.put_u16_le(self.tslc);
5172        __tmp.put_u16_le(self.flags.bits());
5173        __tmp.put_i8(self.turn_rate);
5174        __tmp.put_u8(self.navigational_status as u8);
5175        __tmp.put_u8(self.mavtype as u8);
5176        __tmp.put_u8(self.dimension_port);
5177        __tmp.put_u8(self.dimension_starboard);
5178        for val in &self.callsign {
5179            __tmp.put_u8(*val);
5180        }
5181        for val in &self.name {
5182            __tmp.put_u8(*val);
5183        }
5184        if matches!(version, MavlinkVersion::V2) {
5185            let len = __tmp.len();
5186            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5187        } else {
5188            __tmp.len()
5189        }
5190    }
5191}
5192#[doc = "The current system altitude."]
5193#[doc = ""]
5194#[doc = "ID: 141"]
5195#[derive(Debug, Clone, PartialEq)]
5196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5198#[cfg_attr(feature = "ts", derive(TS))]
5199#[cfg_attr(feature = "ts", ts(export))]
5200pub struct ALTITUDE_DATA {
5201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5202    pub time_usec: u64,
5203    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5204    pub altitude_monotonic: f32,
5205    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5206    pub altitude_amsl: f32,
5207    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5208    pub altitude_local: f32,
5209    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5210    pub altitude_relative: f32,
5211    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5212    pub altitude_terrain: f32,
5213    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5214    pub bottom_clearance: f32,
5215}
5216impl ALTITUDE_DATA {
5217    pub const ENCODED_LEN: usize = 32usize;
5218    pub const DEFAULT: Self = Self {
5219        time_usec: 0_u64,
5220        altitude_monotonic: 0.0_f32,
5221        altitude_amsl: 0.0_f32,
5222        altitude_local: 0.0_f32,
5223        altitude_relative: 0.0_f32,
5224        altitude_terrain: 0.0_f32,
5225        bottom_clearance: 0.0_f32,
5226    };
5227    #[cfg(feature = "arbitrary")]
5228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5229        use arbitrary::{Arbitrary, Unstructured};
5230        let mut buf = [0u8; 1024];
5231        rng.fill_bytes(&mut buf);
5232        let mut unstructured = Unstructured::new(&buf);
5233        Self::arbitrary(&mut unstructured).unwrap_or_default()
5234    }
5235}
5236impl Default for ALTITUDE_DATA {
5237    fn default() -> Self {
5238        Self::DEFAULT.clone()
5239    }
5240}
5241impl MessageData for ALTITUDE_DATA {
5242    type Message = MavMessage;
5243    const ID: u32 = 141u32;
5244    const NAME: &'static str = "ALTITUDE";
5245    const EXTRA_CRC: u8 = 47u8;
5246    const ENCODED_LEN: usize = 32usize;
5247    fn deser(
5248        _version: MavlinkVersion,
5249        __input: &[u8],
5250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5251        let avail_len = __input.len();
5252        let mut payload_buf = [0; Self::ENCODED_LEN];
5253        let mut buf = if avail_len < Self::ENCODED_LEN {
5254            payload_buf[0..avail_len].copy_from_slice(__input);
5255            Bytes::new(&payload_buf)
5256        } else {
5257            Bytes::new(__input)
5258        };
5259        let mut __struct = Self::default();
5260        __struct.time_usec = buf.get_u64_le();
5261        __struct.altitude_monotonic = buf.get_f32_le();
5262        __struct.altitude_amsl = buf.get_f32_le();
5263        __struct.altitude_local = buf.get_f32_le();
5264        __struct.altitude_relative = buf.get_f32_le();
5265        __struct.altitude_terrain = buf.get_f32_le();
5266        __struct.bottom_clearance = buf.get_f32_le();
5267        Ok(__struct)
5268    }
5269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5270        let mut __tmp = BytesMut::new(bytes);
5271        #[allow(clippy::absurd_extreme_comparisons)]
5272        #[allow(unused_comparisons)]
5273        if __tmp.remaining() < Self::ENCODED_LEN {
5274            panic!(
5275                "buffer is too small (need {} bytes, but got {})",
5276                Self::ENCODED_LEN,
5277                __tmp.remaining(),
5278            )
5279        }
5280        __tmp.put_u64_le(self.time_usec);
5281        __tmp.put_f32_le(self.altitude_monotonic);
5282        __tmp.put_f32_le(self.altitude_amsl);
5283        __tmp.put_f32_le(self.altitude_local);
5284        __tmp.put_f32_le(self.altitude_relative);
5285        __tmp.put_f32_le(self.altitude_terrain);
5286        __tmp.put_f32_le(self.bottom_clearance);
5287        if matches!(version, MavlinkVersion::V2) {
5288            let len = __tmp.len();
5289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5290        } else {
5291            __tmp.len()
5292        }
5293    }
5294}
5295#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5296#[doc = ""]
5297#[doc = "ID: 30"]
5298#[derive(Debug, Clone, PartialEq)]
5299#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5300#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5301#[cfg_attr(feature = "ts", derive(TS))]
5302#[cfg_attr(feature = "ts", ts(export))]
5303pub struct ATTITUDE_DATA {
5304    #[doc = "Timestamp (time since system boot)."]
5305    pub time_boot_ms: u32,
5306    #[doc = "Roll angle (-pi..+pi)"]
5307    pub roll: f32,
5308    #[doc = "Pitch angle (-pi..+pi)"]
5309    pub pitch: f32,
5310    #[doc = "Yaw angle (-pi..+pi)"]
5311    pub yaw: f32,
5312    #[doc = "Roll angular speed"]
5313    pub rollspeed: f32,
5314    #[doc = "Pitch angular speed"]
5315    pub pitchspeed: f32,
5316    #[doc = "Yaw angular speed"]
5317    pub yawspeed: f32,
5318}
5319impl ATTITUDE_DATA {
5320    pub const ENCODED_LEN: usize = 28usize;
5321    pub const DEFAULT: Self = Self {
5322        time_boot_ms: 0_u32,
5323        roll: 0.0_f32,
5324        pitch: 0.0_f32,
5325        yaw: 0.0_f32,
5326        rollspeed: 0.0_f32,
5327        pitchspeed: 0.0_f32,
5328        yawspeed: 0.0_f32,
5329    };
5330    #[cfg(feature = "arbitrary")]
5331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5332        use arbitrary::{Arbitrary, Unstructured};
5333        let mut buf = [0u8; 1024];
5334        rng.fill_bytes(&mut buf);
5335        let mut unstructured = Unstructured::new(&buf);
5336        Self::arbitrary(&mut unstructured).unwrap_or_default()
5337    }
5338}
5339impl Default for ATTITUDE_DATA {
5340    fn default() -> Self {
5341        Self::DEFAULT.clone()
5342    }
5343}
5344impl MessageData for ATTITUDE_DATA {
5345    type Message = MavMessage;
5346    const ID: u32 = 30u32;
5347    const NAME: &'static str = "ATTITUDE";
5348    const EXTRA_CRC: u8 = 39u8;
5349    const ENCODED_LEN: usize = 28usize;
5350    fn deser(
5351        _version: MavlinkVersion,
5352        __input: &[u8],
5353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5354        let avail_len = __input.len();
5355        let mut payload_buf = [0; Self::ENCODED_LEN];
5356        let mut buf = if avail_len < Self::ENCODED_LEN {
5357            payload_buf[0..avail_len].copy_from_slice(__input);
5358            Bytes::new(&payload_buf)
5359        } else {
5360            Bytes::new(__input)
5361        };
5362        let mut __struct = Self::default();
5363        __struct.time_boot_ms = buf.get_u32_le();
5364        __struct.roll = buf.get_f32_le();
5365        __struct.pitch = buf.get_f32_le();
5366        __struct.yaw = buf.get_f32_le();
5367        __struct.rollspeed = buf.get_f32_le();
5368        __struct.pitchspeed = buf.get_f32_le();
5369        __struct.yawspeed = buf.get_f32_le();
5370        Ok(__struct)
5371    }
5372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5373        let mut __tmp = BytesMut::new(bytes);
5374        #[allow(clippy::absurd_extreme_comparisons)]
5375        #[allow(unused_comparisons)]
5376        if __tmp.remaining() < Self::ENCODED_LEN {
5377            panic!(
5378                "buffer is too small (need {} bytes, but got {})",
5379                Self::ENCODED_LEN,
5380                __tmp.remaining(),
5381            )
5382        }
5383        __tmp.put_u32_le(self.time_boot_ms);
5384        __tmp.put_f32_le(self.roll);
5385        __tmp.put_f32_le(self.pitch);
5386        __tmp.put_f32_le(self.yaw);
5387        __tmp.put_f32_le(self.rollspeed);
5388        __tmp.put_f32_le(self.pitchspeed);
5389        __tmp.put_f32_le(self.yawspeed);
5390        if matches!(version, MavlinkVersion::V2) {
5391            let len = __tmp.len();
5392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5393        } else {
5394            __tmp.len()
5395        }
5396    }
5397}
5398#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5399#[doc = ""]
5400#[doc = "ID: 31"]
5401#[derive(Debug, Clone, PartialEq)]
5402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5404#[cfg_attr(feature = "ts", derive(TS))]
5405#[cfg_attr(feature = "ts", ts(export))]
5406pub struct ATTITUDE_QUATERNION_DATA {
5407    #[doc = "Timestamp (time since system boot)."]
5408    pub time_boot_ms: u32,
5409    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5410    pub q1: f32,
5411    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5412    pub q2: f32,
5413    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5414    pub q3: f32,
5415    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5416    pub q4: f32,
5417    #[doc = "Roll angular speed"]
5418    pub rollspeed: f32,
5419    #[doc = "Pitch angular speed"]
5420    pub pitchspeed: f32,
5421    #[doc = "Yaw angular speed"]
5422    pub yawspeed: f32,
5423    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5426    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5427    pub repr_offset_q: [f32; 4],
5428}
5429impl ATTITUDE_QUATERNION_DATA {
5430    pub const ENCODED_LEN: usize = 48usize;
5431    pub const DEFAULT: Self = Self {
5432        time_boot_ms: 0_u32,
5433        q1: 0.0_f32,
5434        q2: 0.0_f32,
5435        q3: 0.0_f32,
5436        q4: 0.0_f32,
5437        rollspeed: 0.0_f32,
5438        pitchspeed: 0.0_f32,
5439        yawspeed: 0.0_f32,
5440        repr_offset_q: [0.0_f32; 4usize],
5441    };
5442    #[cfg(feature = "arbitrary")]
5443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5444        use arbitrary::{Arbitrary, Unstructured};
5445        let mut buf = [0u8; 1024];
5446        rng.fill_bytes(&mut buf);
5447        let mut unstructured = Unstructured::new(&buf);
5448        Self::arbitrary(&mut unstructured).unwrap_or_default()
5449    }
5450}
5451impl Default for ATTITUDE_QUATERNION_DATA {
5452    fn default() -> Self {
5453        Self::DEFAULT.clone()
5454    }
5455}
5456impl MessageData for ATTITUDE_QUATERNION_DATA {
5457    type Message = MavMessage;
5458    const ID: u32 = 31u32;
5459    const NAME: &'static str = "ATTITUDE_QUATERNION";
5460    const EXTRA_CRC: u8 = 246u8;
5461    const ENCODED_LEN: usize = 48usize;
5462    fn deser(
5463        _version: MavlinkVersion,
5464        __input: &[u8],
5465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5466        let avail_len = __input.len();
5467        let mut payload_buf = [0; Self::ENCODED_LEN];
5468        let mut buf = if avail_len < Self::ENCODED_LEN {
5469            payload_buf[0..avail_len].copy_from_slice(__input);
5470            Bytes::new(&payload_buf)
5471        } else {
5472            Bytes::new(__input)
5473        };
5474        let mut __struct = Self::default();
5475        __struct.time_boot_ms = buf.get_u32_le();
5476        __struct.q1 = buf.get_f32_le();
5477        __struct.q2 = buf.get_f32_le();
5478        __struct.q3 = buf.get_f32_le();
5479        __struct.q4 = buf.get_f32_le();
5480        __struct.rollspeed = buf.get_f32_le();
5481        __struct.pitchspeed = buf.get_f32_le();
5482        __struct.yawspeed = buf.get_f32_le();
5483        for v in &mut __struct.repr_offset_q {
5484            let val = buf.get_f32_le();
5485            *v = val;
5486        }
5487        Ok(__struct)
5488    }
5489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5490        let mut __tmp = BytesMut::new(bytes);
5491        #[allow(clippy::absurd_extreme_comparisons)]
5492        #[allow(unused_comparisons)]
5493        if __tmp.remaining() < Self::ENCODED_LEN {
5494            panic!(
5495                "buffer is too small (need {} bytes, but got {})",
5496                Self::ENCODED_LEN,
5497                __tmp.remaining(),
5498            )
5499        }
5500        __tmp.put_u32_le(self.time_boot_ms);
5501        __tmp.put_f32_le(self.q1);
5502        __tmp.put_f32_le(self.q2);
5503        __tmp.put_f32_le(self.q3);
5504        __tmp.put_f32_le(self.q4);
5505        __tmp.put_f32_le(self.rollspeed);
5506        __tmp.put_f32_le(self.pitchspeed);
5507        __tmp.put_f32_le(self.yawspeed);
5508        if matches!(version, MavlinkVersion::V2) {
5509            for val in &self.repr_offset_q {
5510                __tmp.put_f32_le(*val);
5511            }
5512            let len = __tmp.len();
5513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5514        } else {
5515            __tmp.len()
5516        }
5517    }
5518}
5519#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5520#[doc = ""]
5521#[doc = "ID: 61"]
5522#[derive(Debug, Clone, PartialEq)]
5523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5525#[cfg_attr(feature = "ts", derive(TS))]
5526#[cfg_attr(feature = "ts", ts(export))]
5527pub struct ATTITUDE_QUATERNION_COV_DATA {
5528    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5529    pub time_usec: u64,
5530    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5532    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5533    pub q: [f32; 4],
5534    #[doc = "Roll angular speed"]
5535    pub rollspeed: f32,
5536    #[doc = "Pitch angular speed"]
5537    pub pitchspeed: f32,
5538    #[doc = "Yaw angular speed"]
5539    pub yawspeed: f32,
5540    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5542    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5543    pub covariance: [f32; 9],
5544}
5545impl ATTITUDE_QUATERNION_COV_DATA {
5546    pub const ENCODED_LEN: usize = 72usize;
5547    pub const DEFAULT: Self = Self {
5548        time_usec: 0_u64,
5549        q: [0.0_f32; 4usize],
5550        rollspeed: 0.0_f32,
5551        pitchspeed: 0.0_f32,
5552        yawspeed: 0.0_f32,
5553        covariance: [0.0_f32; 9usize],
5554    };
5555    #[cfg(feature = "arbitrary")]
5556    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5557        use arbitrary::{Arbitrary, Unstructured};
5558        let mut buf = [0u8; 1024];
5559        rng.fill_bytes(&mut buf);
5560        let mut unstructured = Unstructured::new(&buf);
5561        Self::arbitrary(&mut unstructured).unwrap_or_default()
5562    }
5563}
5564impl Default for ATTITUDE_QUATERNION_COV_DATA {
5565    fn default() -> Self {
5566        Self::DEFAULT.clone()
5567    }
5568}
5569impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5570    type Message = MavMessage;
5571    const ID: u32 = 61u32;
5572    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5573    const EXTRA_CRC: u8 = 167u8;
5574    const ENCODED_LEN: usize = 72usize;
5575    fn deser(
5576        _version: MavlinkVersion,
5577        __input: &[u8],
5578    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5579        let avail_len = __input.len();
5580        let mut payload_buf = [0; Self::ENCODED_LEN];
5581        let mut buf = if avail_len < Self::ENCODED_LEN {
5582            payload_buf[0..avail_len].copy_from_slice(__input);
5583            Bytes::new(&payload_buf)
5584        } else {
5585            Bytes::new(__input)
5586        };
5587        let mut __struct = Self::default();
5588        __struct.time_usec = buf.get_u64_le();
5589        for v in &mut __struct.q {
5590            let val = buf.get_f32_le();
5591            *v = val;
5592        }
5593        __struct.rollspeed = buf.get_f32_le();
5594        __struct.pitchspeed = buf.get_f32_le();
5595        __struct.yawspeed = buf.get_f32_le();
5596        for v in &mut __struct.covariance {
5597            let val = buf.get_f32_le();
5598            *v = val;
5599        }
5600        Ok(__struct)
5601    }
5602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5603        let mut __tmp = BytesMut::new(bytes);
5604        #[allow(clippy::absurd_extreme_comparisons)]
5605        #[allow(unused_comparisons)]
5606        if __tmp.remaining() < Self::ENCODED_LEN {
5607            panic!(
5608                "buffer is too small (need {} bytes, but got {})",
5609                Self::ENCODED_LEN,
5610                __tmp.remaining(),
5611            )
5612        }
5613        __tmp.put_u64_le(self.time_usec);
5614        for val in &self.q {
5615            __tmp.put_f32_le(*val);
5616        }
5617        __tmp.put_f32_le(self.rollspeed);
5618        __tmp.put_f32_le(self.pitchspeed);
5619        __tmp.put_f32_le(self.yawspeed);
5620        for val in &self.covariance {
5621            __tmp.put_f32_le(*val);
5622        }
5623        if matches!(version, MavlinkVersion::V2) {
5624            let len = __tmp.len();
5625            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5626        } else {
5627            __tmp.len()
5628        }
5629    }
5630}
5631#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5632#[doc = ""]
5633#[doc = "ID: 83"]
5634#[derive(Debug, Clone, PartialEq)]
5635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5637#[cfg_attr(feature = "ts", derive(TS))]
5638#[cfg_attr(feature = "ts", ts(export))]
5639pub struct ATTITUDE_TARGET_DATA {
5640    #[doc = "Timestamp (time since system boot)."]
5641    pub time_boot_ms: u32,
5642    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5645    pub q: [f32; 4],
5646    #[doc = "Body roll rate"]
5647    pub body_roll_rate: f32,
5648    #[doc = "Body pitch rate"]
5649    pub body_pitch_rate: f32,
5650    #[doc = "Body yaw rate"]
5651    pub body_yaw_rate: f32,
5652    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5653    pub thrust: f32,
5654    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5655    pub type_mask: AttitudeTargetTypemask,
5656}
5657impl ATTITUDE_TARGET_DATA {
5658    pub const ENCODED_LEN: usize = 37usize;
5659    pub const DEFAULT: Self = Self {
5660        time_boot_ms: 0_u32,
5661        q: [0.0_f32; 4usize],
5662        body_roll_rate: 0.0_f32,
5663        body_pitch_rate: 0.0_f32,
5664        body_yaw_rate: 0.0_f32,
5665        thrust: 0.0_f32,
5666        type_mask: AttitudeTargetTypemask::DEFAULT,
5667    };
5668    #[cfg(feature = "arbitrary")]
5669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5670        use arbitrary::{Arbitrary, Unstructured};
5671        let mut buf = [0u8; 1024];
5672        rng.fill_bytes(&mut buf);
5673        let mut unstructured = Unstructured::new(&buf);
5674        Self::arbitrary(&mut unstructured).unwrap_or_default()
5675    }
5676}
5677impl Default for ATTITUDE_TARGET_DATA {
5678    fn default() -> Self {
5679        Self::DEFAULT.clone()
5680    }
5681}
5682impl MessageData for ATTITUDE_TARGET_DATA {
5683    type Message = MavMessage;
5684    const ID: u32 = 83u32;
5685    const NAME: &'static str = "ATTITUDE_TARGET";
5686    const EXTRA_CRC: u8 = 22u8;
5687    const ENCODED_LEN: usize = 37usize;
5688    fn deser(
5689        _version: MavlinkVersion,
5690        __input: &[u8],
5691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5692        let avail_len = __input.len();
5693        let mut payload_buf = [0; Self::ENCODED_LEN];
5694        let mut buf = if avail_len < Self::ENCODED_LEN {
5695            payload_buf[0..avail_len].copy_from_slice(__input);
5696            Bytes::new(&payload_buf)
5697        } else {
5698            Bytes::new(__input)
5699        };
5700        let mut __struct = Self::default();
5701        __struct.time_boot_ms = buf.get_u32_le();
5702        for v in &mut __struct.q {
5703            let val = buf.get_f32_le();
5704            *v = val;
5705        }
5706        __struct.body_roll_rate = buf.get_f32_le();
5707        __struct.body_pitch_rate = buf.get_f32_le();
5708        __struct.body_yaw_rate = buf.get_f32_le();
5709        __struct.thrust = buf.get_f32_le();
5710        let tmp = buf.get_u8();
5711        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
5712            ::mavlink_core::error::ParserError::InvalidFlag {
5713                flag_type: "AttitudeTargetTypemask",
5714                value: tmp as u64,
5715            },
5716        )?;
5717        Ok(__struct)
5718    }
5719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5720        let mut __tmp = BytesMut::new(bytes);
5721        #[allow(clippy::absurd_extreme_comparisons)]
5722        #[allow(unused_comparisons)]
5723        if __tmp.remaining() < Self::ENCODED_LEN {
5724            panic!(
5725                "buffer is too small (need {} bytes, but got {})",
5726                Self::ENCODED_LEN,
5727                __tmp.remaining(),
5728            )
5729        }
5730        __tmp.put_u32_le(self.time_boot_ms);
5731        for val in &self.q {
5732            __tmp.put_f32_le(*val);
5733        }
5734        __tmp.put_f32_le(self.body_roll_rate);
5735        __tmp.put_f32_le(self.body_pitch_rate);
5736        __tmp.put_f32_le(self.body_yaw_rate);
5737        __tmp.put_f32_le(self.thrust);
5738        __tmp.put_u8(self.type_mask.bits());
5739        if matches!(version, MavlinkVersion::V2) {
5740            let len = __tmp.len();
5741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5742        } else {
5743            __tmp.len()
5744        }
5745    }
5746}
5747#[doc = "Motion capture attitude and position."]
5748#[doc = ""]
5749#[doc = "ID: 138"]
5750#[derive(Debug, Clone, PartialEq)]
5751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5753#[cfg_attr(feature = "ts", derive(TS))]
5754#[cfg_attr(feature = "ts", ts(export))]
5755pub struct ATT_POS_MOCAP_DATA {
5756    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5757    pub time_usec: u64,
5758    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5759    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5760    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5761    pub q: [f32; 4],
5762    #[doc = "X position (NED)"]
5763    pub x: f32,
5764    #[doc = "Y position (NED)"]
5765    pub y: f32,
5766    #[doc = "Z position (NED)"]
5767    pub z: f32,
5768    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5772    pub covariance: [f32; 21],
5773}
5774impl ATT_POS_MOCAP_DATA {
5775    pub const ENCODED_LEN: usize = 120usize;
5776    pub const DEFAULT: Self = Self {
5777        time_usec: 0_u64,
5778        q: [0.0_f32; 4usize],
5779        x: 0.0_f32,
5780        y: 0.0_f32,
5781        z: 0.0_f32,
5782        covariance: [0.0_f32; 21usize],
5783    };
5784    #[cfg(feature = "arbitrary")]
5785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5786        use arbitrary::{Arbitrary, Unstructured};
5787        let mut buf = [0u8; 1024];
5788        rng.fill_bytes(&mut buf);
5789        let mut unstructured = Unstructured::new(&buf);
5790        Self::arbitrary(&mut unstructured).unwrap_or_default()
5791    }
5792}
5793impl Default for ATT_POS_MOCAP_DATA {
5794    fn default() -> Self {
5795        Self::DEFAULT.clone()
5796    }
5797}
5798impl MessageData for ATT_POS_MOCAP_DATA {
5799    type Message = MavMessage;
5800    const ID: u32 = 138u32;
5801    const NAME: &'static str = "ATT_POS_MOCAP";
5802    const EXTRA_CRC: u8 = 109u8;
5803    const ENCODED_LEN: usize = 120usize;
5804    fn deser(
5805        _version: MavlinkVersion,
5806        __input: &[u8],
5807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5808        let avail_len = __input.len();
5809        let mut payload_buf = [0; Self::ENCODED_LEN];
5810        let mut buf = if avail_len < Self::ENCODED_LEN {
5811            payload_buf[0..avail_len].copy_from_slice(__input);
5812            Bytes::new(&payload_buf)
5813        } else {
5814            Bytes::new(__input)
5815        };
5816        let mut __struct = Self::default();
5817        __struct.time_usec = buf.get_u64_le();
5818        for v in &mut __struct.q {
5819            let val = buf.get_f32_le();
5820            *v = val;
5821        }
5822        __struct.x = buf.get_f32_le();
5823        __struct.y = buf.get_f32_le();
5824        __struct.z = buf.get_f32_le();
5825        for v in &mut __struct.covariance {
5826            let val = buf.get_f32_le();
5827            *v = val;
5828        }
5829        Ok(__struct)
5830    }
5831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5832        let mut __tmp = BytesMut::new(bytes);
5833        #[allow(clippy::absurd_extreme_comparisons)]
5834        #[allow(unused_comparisons)]
5835        if __tmp.remaining() < Self::ENCODED_LEN {
5836            panic!(
5837                "buffer is too small (need {} bytes, but got {})",
5838                Self::ENCODED_LEN,
5839                __tmp.remaining(),
5840            )
5841        }
5842        __tmp.put_u64_le(self.time_usec);
5843        for val in &self.q {
5844            __tmp.put_f32_le(*val);
5845        }
5846        __tmp.put_f32_le(self.x);
5847        __tmp.put_f32_le(self.y);
5848        __tmp.put_f32_le(self.z);
5849        if matches!(version, MavlinkVersion::V2) {
5850            for val in &self.covariance {
5851                __tmp.put_f32_le(*val);
5852            }
5853            let len = __tmp.len();
5854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5855        } else {
5856            __tmp.len()
5857        }
5858    }
5859}
5860#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5861#[doc = ""]
5862#[doc = "ID: 7"]
5863#[derive(Debug, Clone, PartialEq)]
5864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5866#[cfg_attr(feature = "ts", derive(TS))]
5867#[cfg_attr(feature = "ts", ts(export))]
5868pub struct AUTH_KEY_DATA {
5869    #[doc = "key"]
5870    #[cfg_attr(feature = "ts", ts(type = "string"))]
5871    pub key: CharArray<32>,
5872}
5873impl AUTH_KEY_DATA {
5874    pub const ENCODED_LEN: usize = 32usize;
5875    pub const DEFAULT: Self = Self {
5876        key: CharArray::new([0_u8; 32usize]),
5877    };
5878    #[cfg(feature = "arbitrary")]
5879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5880        use arbitrary::{Arbitrary, Unstructured};
5881        let mut buf = [0u8; 1024];
5882        rng.fill_bytes(&mut buf);
5883        let mut unstructured = Unstructured::new(&buf);
5884        Self::arbitrary(&mut unstructured).unwrap_or_default()
5885    }
5886}
5887impl Default for AUTH_KEY_DATA {
5888    fn default() -> Self {
5889        Self::DEFAULT.clone()
5890    }
5891}
5892impl MessageData for AUTH_KEY_DATA {
5893    type Message = MavMessage;
5894    const ID: u32 = 7u32;
5895    const NAME: &'static str = "AUTH_KEY";
5896    const EXTRA_CRC: u8 = 119u8;
5897    const ENCODED_LEN: usize = 32usize;
5898    fn deser(
5899        _version: MavlinkVersion,
5900        __input: &[u8],
5901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5902        let avail_len = __input.len();
5903        let mut payload_buf = [0; Self::ENCODED_LEN];
5904        let mut buf = if avail_len < Self::ENCODED_LEN {
5905            payload_buf[0..avail_len].copy_from_slice(__input);
5906            Bytes::new(&payload_buf)
5907        } else {
5908            Bytes::new(__input)
5909        };
5910        let mut __struct = Self::default();
5911        let mut tmp = [0_u8; 32usize];
5912        for v in &mut tmp {
5913            *v = buf.get_u8();
5914        }
5915        __struct.key = CharArray::new(tmp);
5916        Ok(__struct)
5917    }
5918    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5919        let mut __tmp = BytesMut::new(bytes);
5920        #[allow(clippy::absurd_extreme_comparisons)]
5921        #[allow(unused_comparisons)]
5922        if __tmp.remaining() < Self::ENCODED_LEN {
5923            panic!(
5924                "buffer is too small (need {} bytes, but got {})",
5925                Self::ENCODED_LEN,
5926                __tmp.remaining(),
5927            )
5928        }
5929        for val in &self.key {
5930            __tmp.put_u8(*val);
5931        }
5932        if matches!(version, MavlinkVersion::V2) {
5933            let len = __tmp.len();
5934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5935        } else {
5936            __tmp.len()
5937        }
5938    }
5939}
5940#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5941#[doc = ""]
5942#[doc = "ID: 286"]
5943#[derive(Debug, Clone, PartialEq)]
5944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5946#[cfg_attr(feature = "ts", derive(TS))]
5947#[cfg_attr(feature = "ts", ts(export))]
5948pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5949    #[doc = "Timestamp (time since system boot)."]
5950    pub time_boot_us: u64,
5951    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5953    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5954    pub q: [f32; 4],
5955    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5956    pub q_estimated_delay_us: u32,
5957    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5958    pub vx: f32,
5959    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5960    pub vy: f32,
5961    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5962    pub vz: f32,
5963    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5964    pub v_estimated_delay_us: u32,
5965    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5966    pub feed_forward_angular_velocity_z: f32,
5967    #[doc = "Bitmap indicating which estimator outputs are valid."]
5968    pub estimator_status: EstimatorStatusFlags,
5969    #[doc = "System ID"]
5970    pub target_system: u8,
5971    #[doc = "Component ID"]
5972    pub target_component: u8,
5973    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5974    pub landed_state: MavLandedState,
5975    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5976    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5977    pub angular_velocity_z: f32,
5978}
5979impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5980    pub const ENCODED_LEN: usize = 57usize;
5981    pub const DEFAULT: Self = Self {
5982        time_boot_us: 0_u64,
5983        q: [0.0_f32; 4usize],
5984        q_estimated_delay_us: 0_u32,
5985        vx: 0.0_f32,
5986        vy: 0.0_f32,
5987        vz: 0.0_f32,
5988        v_estimated_delay_us: 0_u32,
5989        feed_forward_angular_velocity_z: 0.0_f32,
5990        estimator_status: EstimatorStatusFlags::DEFAULT,
5991        target_system: 0_u8,
5992        target_component: 0_u8,
5993        landed_state: MavLandedState::DEFAULT,
5994        angular_velocity_z: 0.0_f32,
5995    };
5996    #[cfg(feature = "arbitrary")]
5997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5998        use arbitrary::{Arbitrary, Unstructured};
5999        let mut buf = [0u8; 1024];
6000        rng.fill_bytes(&mut buf);
6001        let mut unstructured = Unstructured::new(&buf);
6002        Self::arbitrary(&mut unstructured).unwrap_or_default()
6003    }
6004}
6005impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6006    fn default() -> Self {
6007        Self::DEFAULT.clone()
6008    }
6009}
6010impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6011    type Message = MavMessage;
6012    const ID: u32 = 286u32;
6013    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6014    const EXTRA_CRC: u8 = 210u8;
6015    const ENCODED_LEN: usize = 57usize;
6016    fn deser(
6017        _version: MavlinkVersion,
6018        __input: &[u8],
6019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6020        let avail_len = __input.len();
6021        let mut payload_buf = [0; Self::ENCODED_LEN];
6022        let mut buf = if avail_len < Self::ENCODED_LEN {
6023            payload_buf[0..avail_len].copy_from_slice(__input);
6024            Bytes::new(&payload_buf)
6025        } else {
6026            Bytes::new(__input)
6027        };
6028        let mut __struct = Self::default();
6029        __struct.time_boot_us = buf.get_u64_le();
6030        for v in &mut __struct.q {
6031            let val = buf.get_f32_le();
6032            *v = val;
6033        }
6034        __struct.q_estimated_delay_us = buf.get_u32_le();
6035        __struct.vx = buf.get_f32_le();
6036        __struct.vy = buf.get_f32_le();
6037        __struct.vz = buf.get_f32_le();
6038        __struct.v_estimated_delay_us = buf.get_u32_le();
6039        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6040        let tmp = buf.get_u16_le();
6041        __struct.estimator_status = EstimatorStatusFlags::from_bits(tmp).ok_or(
6042            ::mavlink_core::error::ParserError::InvalidFlag {
6043                flag_type: "EstimatorStatusFlags",
6044                value: tmp as u64,
6045            },
6046        )?;
6047        __struct.target_system = buf.get_u8();
6048        __struct.target_component = buf.get_u8();
6049        let tmp = buf.get_u8();
6050        __struct.landed_state =
6051            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6052                enum_type: "MavLandedState",
6053                value: tmp as u64,
6054            })?;
6055        __struct.angular_velocity_z = buf.get_f32_le();
6056        Ok(__struct)
6057    }
6058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6059        let mut __tmp = BytesMut::new(bytes);
6060        #[allow(clippy::absurd_extreme_comparisons)]
6061        #[allow(unused_comparisons)]
6062        if __tmp.remaining() < Self::ENCODED_LEN {
6063            panic!(
6064                "buffer is too small (need {} bytes, but got {})",
6065                Self::ENCODED_LEN,
6066                __tmp.remaining(),
6067            )
6068        }
6069        __tmp.put_u64_le(self.time_boot_us);
6070        for val in &self.q {
6071            __tmp.put_f32_le(*val);
6072        }
6073        __tmp.put_u32_le(self.q_estimated_delay_us);
6074        __tmp.put_f32_le(self.vx);
6075        __tmp.put_f32_le(self.vy);
6076        __tmp.put_f32_le(self.vz);
6077        __tmp.put_u32_le(self.v_estimated_delay_us);
6078        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6079        __tmp.put_u16_le(self.estimator_status.bits());
6080        __tmp.put_u8(self.target_system);
6081        __tmp.put_u8(self.target_component);
6082        __tmp.put_u8(self.landed_state as u8);
6083        if matches!(version, MavlinkVersion::V2) {
6084            __tmp.put_f32_le(self.angular_velocity_z);
6085            let len = __tmp.len();
6086            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6087        } else {
6088            __tmp.len()
6089        }
6090    }
6091}
6092#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6093#[doc = ""]
6094#[doc = "ID: 148"]
6095#[derive(Debug, Clone, PartialEq)]
6096#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6097#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6098#[cfg_attr(feature = "ts", derive(TS))]
6099#[cfg_attr(feature = "ts", ts(export))]
6100pub struct AUTOPILOT_VERSION_DATA {
6101    #[doc = "Bitmap of capabilities"]
6102    pub capabilities: MavProtocolCapability,
6103    #[doc = "UID if provided by hardware (see uid2)"]
6104    pub uid: u64,
6105    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6106    pub flight_sw_version: u32,
6107    #[doc = "Middleware version number"]
6108    pub middleware_sw_version: u32,
6109    #[doc = "Operating system version number"]
6110    pub os_sw_version: u32,
6111    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6112    pub board_version: u32,
6113    #[doc = "ID of the board vendor"]
6114    pub vendor_id: u16,
6115    #[doc = "ID of the product"]
6116    pub product_id: u16,
6117    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6118    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6119    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6120    pub flight_custom_version: [u8; 8],
6121    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6123    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6124    pub middleware_custom_version: [u8; 8],
6125    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6128    pub os_custom_version: [u8; 8],
6129    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6132    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6133    pub uid2: [u8; 18],
6134}
6135impl AUTOPILOT_VERSION_DATA {
6136    pub const ENCODED_LEN: usize = 78usize;
6137    pub const DEFAULT: Self = Self {
6138        capabilities: MavProtocolCapability::DEFAULT,
6139        uid: 0_u64,
6140        flight_sw_version: 0_u32,
6141        middleware_sw_version: 0_u32,
6142        os_sw_version: 0_u32,
6143        board_version: 0_u32,
6144        vendor_id: 0_u16,
6145        product_id: 0_u16,
6146        flight_custom_version: [0_u8; 8usize],
6147        middleware_custom_version: [0_u8; 8usize],
6148        os_custom_version: [0_u8; 8usize],
6149        uid2: [0_u8; 18usize],
6150    };
6151    #[cfg(feature = "arbitrary")]
6152    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6153        use arbitrary::{Arbitrary, Unstructured};
6154        let mut buf = [0u8; 1024];
6155        rng.fill_bytes(&mut buf);
6156        let mut unstructured = Unstructured::new(&buf);
6157        Self::arbitrary(&mut unstructured).unwrap_or_default()
6158    }
6159}
6160impl Default for AUTOPILOT_VERSION_DATA {
6161    fn default() -> Self {
6162        Self::DEFAULT.clone()
6163    }
6164}
6165impl MessageData for AUTOPILOT_VERSION_DATA {
6166    type Message = MavMessage;
6167    const ID: u32 = 148u32;
6168    const NAME: &'static str = "AUTOPILOT_VERSION";
6169    const EXTRA_CRC: u8 = 178u8;
6170    const ENCODED_LEN: usize = 78usize;
6171    fn deser(
6172        _version: MavlinkVersion,
6173        __input: &[u8],
6174    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6175        let avail_len = __input.len();
6176        let mut payload_buf = [0; Self::ENCODED_LEN];
6177        let mut buf = if avail_len < Self::ENCODED_LEN {
6178            payload_buf[0..avail_len].copy_from_slice(__input);
6179            Bytes::new(&payload_buf)
6180        } else {
6181            Bytes::new(__input)
6182        };
6183        let mut __struct = Self::default();
6184        let tmp = buf.get_u64_le();
6185        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
6186            ::mavlink_core::error::ParserError::InvalidFlag {
6187                flag_type: "MavProtocolCapability",
6188                value: tmp as u64,
6189            },
6190        )?;
6191        __struct.uid = buf.get_u64_le();
6192        __struct.flight_sw_version = buf.get_u32_le();
6193        __struct.middleware_sw_version = buf.get_u32_le();
6194        __struct.os_sw_version = buf.get_u32_le();
6195        __struct.board_version = buf.get_u32_le();
6196        __struct.vendor_id = buf.get_u16_le();
6197        __struct.product_id = buf.get_u16_le();
6198        for v in &mut __struct.flight_custom_version {
6199            let val = buf.get_u8();
6200            *v = val;
6201        }
6202        for v in &mut __struct.middleware_custom_version {
6203            let val = buf.get_u8();
6204            *v = val;
6205        }
6206        for v in &mut __struct.os_custom_version {
6207            let val = buf.get_u8();
6208            *v = val;
6209        }
6210        for v in &mut __struct.uid2 {
6211            let val = buf.get_u8();
6212            *v = val;
6213        }
6214        Ok(__struct)
6215    }
6216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6217        let mut __tmp = BytesMut::new(bytes);
6218        #[allow(clippy::absurd_extreme_comparisons)]
6219        #[allow(unused_comparisons)]
6220        if __tmp.remaining() < Self::ENCODED_LEN {
6221            panic!(
6222                "buffer is too small (need {} bytes, but got {})",
6223                Self::ENCODED_LEN,
6224                __tmp.remaining(),
6225            )
6226        }
6227        __tmp.put_u64_le(self.capabilities.bits());
6228        __tmp.put_u64_le(self.uid);
6229        __tmp.put_u32_le(self.flight_sw_version);
6230        __tmp.put_u32_le(self.middleware_sw_version);
6231        __tmp.put_u32_le(self.os_sw_version);
6232        __tmp.put_u32_le(self.board_version);
6233        __tmp.put_u16_le(self.vendor_id);
6234        __tmp.put_u16_le(self.product_id);
6235        for val in &self.flight_custom_version {
6236            __tmp.put_u8(*val);
6237        }
6238        for val in &self.middleware_custom_version {
6239            __tmp.put_u8(*val);
6240        }
6241        for val in &self.os_custom_version {
6242            __tmp.put_u8(*val);
6243        }
6244        if matches!(version, MavlinkVersion::V2) {
6245            for val in &self.uid2 {
6246                __tmp.put_u8(*val);
6247            }
6248            let len = __tmp.len();
6249            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6250        } else {
6251            __tmp.len()
6252        }
6253    }
6254}
6255#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6256#[doc = ""]
6257#[doc = "ID: 435"]
6258#[derive(Debug, Clone, PartialEq)]
6259#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6260#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6261#[cfg_attr(feature = "ts", derive(TS))]
6262#[cfg_attr(feature = "ts", ts(export))]
6263pub struct AVAILABLE_MODES_DATA {
6264    #[doc = "A bitfield for use for autopilot-specific flags"]
6265    pub custom_mode: u32,
6266    #[doc = "Mode properties."]
6267    pub properties: MavModeProperty,
6268    #[doc = "The total number of available modes for the current vehicle type."]
6269    pub number_modes: u8,
6270    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6271    pub mode_index: u8,
6272    #[doc = "Standard mode."]
6273    pub standard_mode: MavStandardMode,
6274    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6275    #[cfg_attr(feature = "ts", ts(type = "string"))]
6276    pub mode_name: CharArray<35>,
6277}
6278impl AVAILABLE_MODES_DATA {
6279    pub const ENCODED_LEN: usize = 46usize;
6280    pub const DEFAULT: Self = Self {
6281        custom_mode: 0_u32,
6282        properties: MavModeProperty::DEFAULT,
6283        number_modes: 0_u8,
6284        mode_index: 0_u8,
6285        standard_mode: MavStandardMode::DEFAULT,
6286        mode_name: CharArray::new([0_u8; 35usize]),
6287    };
6288    #[cfg(feature = "arbitrary")]
6289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6290        use arbitrary::{Arbitrary, Unstructured};
6291        let mut buf = [0u8; 1024];
6292        rng.fill_bytes(&mut buf);
6293        let mut unstructured = Unstructured::new(&buf);
6294        Self::arbitrary(&mut unstructured).unwrap_or_default()
6295    }
6296}
6297impl Default for AVAILABLE_MODES_DATA {
6298    fn default() -> Self {
6299        Self::DEFAULT.clone()
6300    }
6301}
6302impl MessageData for AVAILABLE_MODES_DATA {
6303    type Message = MavMessage;
6304    const ID: u32 = 435u32;
6305    const NAME: &'static str = "AVAILABLE_MODES";
6306    const EXTRA_CRC: u8 = 134u8;
6307    const ENCODED_LEN: usize = 46usize;
6308    fn deser(
6309        _version: MavlinkVersion,
6310        __input: &[u8],
6311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6312        let avail_len = __input.len();
6313        let mut payload_buf = [0; Self::ENCODED_LEN];
6314        let mut buf = if avail_len < Self::ENCODED_LEN {
6315            payload_buf[0..avail_len].copy_from_slice(__input);
6316            Bytes::new(&payload_buf)
6317        } else {
6318            Bytes::new(__input)
6319        };
6320        let mut __struct = Self::default();
6321        __struct.custom_mode = buf.get_u32_le();
6322        let tmp = buf.get_u32_le();
6323        __struct.properties = MavModeProperty::from_bits(tmp).ok_or(
6324            ::mavlink_core::error::ParserError::InvalidFlag {
6325                flag_type: "MavModeProperty",
6326                value: tmp as u64,
6327            },
6328        )?;
6329        __struct.number_modes = buf.get_u8();
6330        __struct.mode_index = buf.get_u8();
6331        let tmp = buf.get_u8();
6332        __struct.standard_mode =
6333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6334                enum_type: "MavStandardMode",
6335                value: tmp as u64,
6336            })?;
6337        let mut tmp = [0_u8; 35usize];
6338        for v in &mut tmp {
6339            *v = buf.get_u8();
6340        }
6341        __struct.mode_name = CharArray::new(tmp);
6342        Ok(__struct)
6343    }
6344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6345        let mut __tmp = BytesMut::new(bytes);
6346        #[allow(clippy::absurd_extreme_comparisons)]
6347        #[allow(unused_comparisons)]
6348        if __tmp.remaining() < Self::ENCODED_LEN {
6349            panic!(
6350                "buffer is too small (need {} bytes, but got {})",
6351                Self::ENCODED_LEN,
6352                __tmp.remaining(),
6353            )
6354        }
6355        __tmp.put_u32_le(self.custom_mode);
6356        __tmp.put_u32_le(self.properties.bits());
6357        __tmp.put_u8(self.number_modes);
6358        __tmp.put_u8(self.mode_index);
6359        __tmp.put_u8(self.standard_mode as u8);
6360        for val in &self.mode_name {
6361            __tmp.put_u8(*val);
6362        }
6363        if matches!(version, MavlinkVersion::V2) {
6364            let len = __tmp.len();
6365            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6366        } else {
6367            __tmp.len()
6368        }
6369    }
6370}
6371#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6372#[doc = ""]
6373#[doc = "ID: 437"]
6374#[derive(Debug, Clone, PartialEq)]
6375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6377#[cfg_attr(feature = "ts", derive(TS))]
6378#[cfg_attr(feature = "ts", ts(export))]
6379pub struct AVAILABLE_MODES_MONITOR_DATA {
6380    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6381    pub seq: u8,
6382}
6383impl AVAILABLE_MODES_MONITOR_DATA {
6384    pub const ENCODED_LEN: usize = 1usize;
6385    pub const DEFAULT: Self = Self { seq: 0_u8 };
6386    #[cfg(feature = "arbitrary")]
6387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6388        use arbitrary::{Arbitrary, Unstructured};
6389        let mut buf = [0u8; 1024];
6390        rng.fill_bytes(&mut buf);
6391        let mut unstructured = Unstructured::new(&buf);
6392        Self::arbitrary(&mut unstructured).unwrap_or_default()
6393    }
6394}
6395impl Default for AVAILABLE_MODES_MONITOR_DATA {
6396    fn default() -> Self {
6397        Self::DEFAULT.clone()
6398    }
6399}
6400impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6401    type Message = MavMessage;
6402    const ID: u32 = 437u32;
6403    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6404    const EXTRA_CRC: u8 = 30u8;
6405    const ENCODED_LEN: usize = 1usize;
6406    fn deser(
6407        _version: MavlinkVersion,
6408        __input: &[u8],
6409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6410        let avail_len = __input.len();
6411        let mut payload_buf = [0; Self::ENCODED_LEN];
6412        let mut buf = if avail_len < Self::ENCODED_LEN {
6413            payload_buf[0..avail_len].copy_from_slice(__input);
6414            Bytes::new(&payload_buf)
6415        } else {
6416            Bytes::new(__input)
6417        };
6418        let mut __struct = Self::default();
6419        __struct.seq = buf.get_u8();
6420        Ok(__struct)
6421    }
6422    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6423        let mut __tmp = BytesMut::new(bytes);
6424        #[allow(clippy::absurd_extreme_comparisons)]
6425        #[allow(unused_comparisons)]
6426        if __tmp.remaining() < Self::ENCODED_LEN {
6427            panic!(
6428                "buffer is too small (need {} bytes, but got {})",
6429                Self::ENCODED_LEN,
6430                __tmp.remaining(),
6431            )
6432        }
6433        __tmp.put_u8(self.seq);
6434        if matches!(version, MavlinkVersion::V2) {
6435            let len = __tmp.len();
6436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6437        } else {
6438            __tmp.len()
6439        }
6440    }
6441}
6442#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6443#[doc = ""]
6444#[doc = "ID: 372"]
6445#[derive(Debug, Clone, PartialEq)]
6446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6448#[cfg_attr(feature = "ts", derive(TS))]
6449#[cfg_attr(feature = "ts", ts(export))]
6450pub struct BATTERY_INFO_DATA {
6451    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6452    pub discharge_minimum_voltage: f32,
6453    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6454    pub charging_minimum_voltage: f32,
6455    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6456    pub resting_minimum_voltage: f32,
6457    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6458    pub charging_maximum_voltage: f32,
6459    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6460    pub charging_maximum_current: f32,
6461    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6462    pub nominal_voltage: f32,
6463    #[doc = "Maximum pack discharge current. 0: field not provided."]
6464    pub discharge_maximum_current: f32,
6465    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6466    pub discharge_maximum_burst_current: f32,
6467    #[doc = "Fully charged design capacity. 0: field not provided."]
6468    pub design_capacity: f32,
6469    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6470    pub full_charge_capacity: f32,
6471    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6472    pub cycle_count: u16,
6473    #[doc = "Battery weight. 0: field not provided."]
6474    pub weight: u16,
6475    #[doc = "Battery ID"]
6476    pub id: u8,
6477    #[doc = "Function of the battery."]
6478    pub battery_function: MavBatteryFunction,
6479    #[doc = "Type (chemistry) of the battery."]
6480    pub mavtype: MavBatteryType,
6481    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6482    pub state_of_health: u8,
6483    #[doc = "Number of battery cells in series. 0: field not provided."]
6484    pub cells_in_series: u8,
6485    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6486    #[cfg_attr(feature = "ts", ts(type = "string"))]
6487    pub manufacture_date: CharArray<9>,
6488    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6489    #[cfg_attr(feature = "ts", ts(type = "string"))]
6490    pub serial_number: CharArray<32>,
6491    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6492    #[cfg_attr(feature = "ts", ts(type = "string"))]
6493    pub name: CharArray<50>,
6494}
6495impl BATTERY_INFO_DATA {
6496    pub const ENCODED_LEN: usize = 140usize;
6497    pub const DEFAULT: Self = Self {
6498        discharge_minimum_voltage: 0.0_f32,
6499        charging_minimum_voltage: 0.0_f32,
6500        resting_minimum_voltage: 0.0_f32,
6501        charging_maximum_voltage: 0.0_f32,
6502        charging_maximum_current: 0.0_f32,
6503        nominal_voltage: 0.0_f32,
6504        discharge_maximum_current: 0.0_f32,
6505        discharge_maximum_burst_current: 0.0_f32,
6506        design_capacity: 0.0_f32,
6507        full_charge_capacity: 0.0_f32,
6508        cycle_count: 0_u16,
6509        weight: 0_u16,
6510        id: 0_u8,
6511        battery_function: MavBatteryFunction::DEFAULT,
6512        mavtype: MavBatteryType::DEFAULT,
6513        state_of_health: 0_u8,
6514        cells_in_series: 0_u8,
6515        manufacture_date: CharArray::new([0_u8; 9usize]),
6516        serial_number: CharArray::new([0_u8; 32usize]),
6517        name: CharArray::new([0_u8; 50usize]),
6518    };
6519    #[cfg(feature = "arbitrary")]
6520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6521        use arbitrary::{Arbitrary, Unstructured};
6522        let mut buf = [0u8; 1024];
6523        rng.fill_bytes(&mut buf);
6524        let mut unstructured = Unstructured::new(&buf);
6525        Self::arbitrary(&mut unstructured).unwrap_or_default()
6526    }
6527}
6528impl Default for BATTERY_INFO_DATA {
6529    fn default() -> Self {
6530        Self::DEFAULT.clone()
6531    }
6532}
6533impl MessageData for BATTERY_INFO_DATA {
6534    type Message = MavMessage;
6535    const ID: u32 = 372u32;
6536    const NAME: &'static str = "BATTERY_INFO";
6537    const EXTRA_CRC: u8 = 26u8;
6538    const ENCODED_LEN: usize = 140usize;
6539    fn deser(
6540        _version: MavlinkVersion,
6541        __input: &[u8],
6542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6543        let avail_len = __input.len();
6544        let mut payload_buf = [0; Self::ENCODED_LEN];
6545        let mut buf = if avail_len < Self::ENCODED_LEN {
6546            payload_buf[0..avail_len].copy_from_slice(__input);
6547            Bytes::new(&payload_buf)
6548        } else {
6549            Bytes::new(__input)
6550        };
6551        let mut __struct = Self::default();
6552        __struct.discharge_minimum_voltage = buf.get_f32_le();
6553        __struct.charging_minimum_voltage = buf.get_f32_le();
6554        __struct.resting_minimum_voltage = buf.get_f32_le();
6555        __struct.charging_maximum_voltage = buf.get_f32_le();
6556        __struct.charging_maximum_current = buf.get_f32_le();
6557        __struct.nominal_voltage = buf.get_f32_le();
6558        __struct.discharge_maximum_current = buf.get_f32_le();
6559        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6560        __struct.design_capacity = buf.get_f32_le();
6561        __struct.full_charge_capacity = buf.get_f32_le();
6562        __struct.cycle_count = buf.get_u16_le();
6563        __struct.weight = buf.get_u16_le();
6564        __struct.id = buf.get_u8();
6565        let tmp = buf.get_u8();
6566        __struct.battery_function =
6567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6568                enum_type: "MavBatteryFunction",
6569                value: tmp as u64,
6570            })?;
6571        let tmp = buf.get_u8();
6572        __struct.mavtype =
6573            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6574                enum_type: "MavBatteryType",
6575                value: tmp as u64,
6576            })?;
6577        __struct.state_of_health = buf.get_u8();
6578        __struct.cells_in_series = buf.get_u8();
6579        let mut tmp = [0_u8; 9usize];
6580        for v in &mut tmp {
6581            *v = buf.get_u8();
6582        }
6583        __struct.manufacture_date = CharArray::new(tmp);
6584        let mut tmp = [0_u8; 32usize];
6585        for v in &mut tmp {
6586            *v = buf.get_u8();
6587        }
6588        __struct.serial_number = CharArray::new(tmp);
6589        let mut tmp = [0_u8; 50usize];
6590        for v in &mut tmp {
6591            *v = buf.get_u8();
6592        }
6593        __struct.name = CharArray::new(tmp);
6594        Ok(__struct)
6595    }
6596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6597        let mut __tmp = BytesMut::new(bytes);
6598        #[allow(clippy::absurd_extreme_comparisons)]
6599        #[allow(unused_comparisons)]
6600        if __tmp.remaining() < Self::ENCODED_LEN {
6601            panic!(
6602                "buffer is too small (need {} bytes, but got {})",
6603                Self::ENCODED_LEN,
6604                __tmp.remaining(),
6605            )
6606        }
6607        __tmp.put_f32_le(self.discharge_minimum_voltage);
6608        __tmp.put_f32_le(self.charging_minimum_voltage);
6609        __tmp.put_f32_le(self.resting_minimum_voltage);
6610        __tmp.put_f32_le(self.charging_maximum_voltage);
6611        __tmp.put_f32_le(self.charging_maximum_current);
6612        __tmp.put_f32_le(self.nominal_voltage);
6613        __tmp.put_f32_le(self.discharge_maximum_current);
6614        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6615        __tmp.put_f32_le(self.design_capacity);
6616        __tmp.put_f32_le(self.full_charge_capacity);
6617        __tmp.put_u16_le(self.cycle_count);
6618        __tmp.put_u16_le(self.weight);
6619        __tmp.put_u8(self.id);
6620        __tmp.put_u8(self.battery_function as u8);
6621        __tmp.put_u8(self.mavtype as u8);
6622        __tmp.put_u8(self.state_of_health);
6623        __tmp.put_u8(self.cells_in_series);
6624        for val in &self.manufacture_date {
6625            __tmp.put_u8(*val);
6626        }
6627        for val in &self.serial_number {
6628            __tmp.put_u8(*val);
6629        }
6630        for val in &self.name {
6631            __tmp.put_u8(*val);
6632        }
6633        if matches!(version, MavlinkVersion::V2) {
6634            let len = __tmp.len();
6635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6636        } else {
6637            __tmp.len()
6638        }
6639    }
6640}
6641#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6642#[doc = ""]
6643#[doc = "ID: 147"]
6644#[derive(Debug, Clone, PartialEq)]
6645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6647#[cfg_attr(feature = "ts", derive(TS))]
6648#[cfg_attr(feature = "ts", ts(export))]
6649pub struct BATTERY_STATUS_DATA {
6650    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6651    pub current_consumed: i32,
6652    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6653    pub energy_consumed: i32,
6654    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6655    pub temperature: i16,
6656    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6658    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6659    pub voltages: [u16; 10],
6660    #[doc = "Battery current, -1: autopilot does not measure the current"]
6661    pub current_battery: i16,
6662    #[doc = "Battery ID"]
6663    pub id: u8,
6664    #[doc = "Function of the battery"]
6665    pub battery_function: MavBatteryFunction,
6666    #[doc = "Type (chemistry) of the battery"]
6667    pub mavtype: MavBatteryType,
6668    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6669    pub battery_remaining: i8,
6670    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6671    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6672    pub time_remaining: i32,
6673    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6674    #[cfg_attr(feature = "serde", serde(default))]
6675    pub charge_state: MavBatteryChargeState,
6676    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6677    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6678    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6679    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6680    pub voltages_ext: [u16; 4],
6681    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6682    #[cfg_attr(feature = "serde", serde(default))]
6683    pub mode: MavBatteryMode,
6684    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6685    #[cfg_attr(feature = "serde", serde(default))]
6686    pub fault_bitmask: MavBatteryFault,
6687}
6688impl BATTERY_STATUS_DATA {
6689    pub const ENCODED_LEN: usize = 54usize;
6690    pub const DEFAULT: Self = Self {
6691        current_consumed: 0_i32,
6692        energy_consumed: 0_i32,
6693        temperature: 0_i16,
6694        voltages: [0_u16; 10usize],
6695        current_battery: 0_i16,
6696        id: 0_u8,
6697        battery_function: MavBatteryFunction::DEFAULT,
6698        mavtype: MavBatteryType::DEFAULT,
6699        battery_remaining: 0_i8,
6700        time_remaining: 0_i32,
6701        charge_state: MavBatteryChargeState::DEFAULT,
6702        voltages_ext: [0_u16; 4usize],
6703        mode: MavBatteryMode::DEFAULT,
6704        fault_bitmask: MavBatteryFault::DEFAULT,
6705    };
6706    #[cfg(feature = "arbitrary")]
6707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6708        use arbitrary::{Arbitrary, Unstructured};
6709        let mut buf = [0u8; 1024];
6710        rng.fill_bytes(&mut buf);
6711        let mut unstructured = Unstructured::new(&buf);
6712        Self::arbitrary(&mut unstructured).unwrap_or_default()
6713    }
6714}
6715impl Default for BATTERY_STATUS_DATA {
6716    fn default() -> Self {
6717        Self::DEFAULT.clone()
6718    }
6719}
6720impl MessageData for BATTERY_STATUS_DATA {
6721    type Message = MavMessage;
6722    const ID: u32 = 147u32;
6723    const NAME: &'static str = "BATTERY_STATUS";
6724    const EXTRA_CRC: u8 = 154u8;
6725    const ENCODED_LEN: usize = 54usize;
6726    fn deser(
6727        _version: MavlinkVersion,
6728        __input: &[u8],
6729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6730        let avail_len = __input.len();
6731        let mut payload_buf = [0; Self::ENCODED_LEN];
6732        let mut buf = if avail_len < Self::ENCODED_LEN {
6733            payload_buf[0..avail_len].copy_from_slice(__input);
6734            Bytes::new(&payload_buf)
6735        } else {
6736            Bytes::new(__input)
6737        };
6738        let mut __struct = Self::default();
6739        __struct.current_consumed = buf.get_i32_le();
6740        __struct.energy_consumed = buf.get_i32_le();
6741        __struct.temperature = buf.get_i16_le();
6742        for v in &mut __struct.voltages {
6743            let val = buf.get_u16_le();
6744            *v = val;
6745        }
6746        __struct.current_battery = buf.get_i16_le();
6747        __struct.id = buf.get_u8();
6748        let tmp = buf.get_u8();
6749        __struct.battery_function =
6750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6751                enum_type: "MavBatteryFunction",
6752                value: tmp as u64,
6753            })?;
6754        let tmp = buf.get_u8();
6755        __struct.mavtype =
6756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6757                enum_type: "MavBatteryType",
6758                value: tmp as u64,
6759            })?;
6760        __struct.battery_remaining = buf.get_i8();
6761        __struct.time_remaining = buf.get_i32_le();
6762        let tmp = buf.get_u8();
6763        __struct.charge_state =
6764            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6765                enum_type: "MavBatteryChargeState",
6766                value: tmp as u64,
6767            })?;
6768        for v in &mut __struct.voltages_ext {
6769            let val = buf.get_u16_le();
6770            *v = val;
6771        }
6772        let tmp = buf.get_u8();
6773        __struct.mode =
6774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6775                enum_type: "MavBatteryMode",
6776                value: tmp as u64,
6777            })?;
6778        let tmp = buf.get_u32_le();
6779        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp).ok_or(
6780            ::mavlink_core::error::ParserError::InvalidFlag {
6781                flag_type: "MavBatteryFault",
6782                value: tmp as u64,
6783            },
6784        )?;
6785        Ok(__struct)
6786    }
6787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6788        let mut __tmp = BytesMut::new(bytes);
6789        #[allow(clippy::absurd_extreme_comparisons)]
6790        #[allow(unused_comparisons)]
6791        if __tmp.remaining() < Self::ENCODED_LEN {
6792            panic!(
6793                "buffer is too small (need {} bytes, but got {})",
6794                Self::ENCODED_LEN,
6795                __tmp.remaining(),
6796            )
6797        }
6798        __tmp.put_i32_le(self.current_consumed);
6799        __tmp.put_i32_le(self.energy_consumed);
6800        __tmp.put_i16_le(self.temperature);
6801        for val in &self.voltages {
6802            __tmp.put_u16_le(*val);
6803        }
6804        __tmp.put_i16_le(self.current_battery);
6805        __tmp.put_u8(self.id);
6806        __tmp.put_u8(self.battery_function as u8);
6807        __tmp.put_u8(self.mavtype as u8);
6808        __tmp.put_i8(self.battery_remaining);
6809        if matches!(version, MavlinkVersion::V2) {
6810            __tmp.put_i32_le(self.time_remaining);
6811            __tmp.put_u8(self.charge_state as u8);
6812            for val in &self.voltages_ext {
6813                __tmp.put_u16_le(*val);
6814            }
6815            __tmp.put_u8(self.mode as u8);
6816            __tmp.put_u32_le(self.fault_bitmask.bits());
6817            let len = __tmp.len();
6818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6819        } else {
6820            __tmp.len()
6821        }
6822    }
6823}
6824#[doc = "Report button state change."]
6825#[doc = ""]
6826#[doc = "ID: 257"]
6827#[derive(Debug, Clone, PartialEq)]
6828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6830#[cfg_attr(feature = "ts", derive(TS))]
6831#[cfg_attr(feature = "ts", ts(export))]
6832pub struct BUTTON_CHANGE_DATA {
6833    #[doc = "Timestamp (time since system boot)."]
6834    pub time_boot_ms: u32,
6835    #[doc = "Time of last change of button state."]
6836    pub last_change_ms: u32,
6837    #[doc = "Bitmap for state of buttons."]
6838    pub state: u8,
6839}
6840impl BUTTON_CHANGE_DATA {
6841    pub const ENCODED_LEN: usize = 9usize;
6842    pub const DEFAULT: Self = Self {
6843        time_boot_ms: 0_u32,
6844        last_change_ms: 0_u32,
6845        state: 0_u8,
6846    };
6847    #[cfg(feature = "arbitrary")]
6848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6849        use arbitrary::{Arbitrary, Unstructured};
6850        let mut buf = [0u8; 1024];
6851        rng.fill_bytes(&mut buf);
6852        let mut unstructured = Unstructured::new(&buf);
6853        Self::arbitrary(&mut unstructured).unwrap_or_default()
6854    }
6855}
6856impl Default for BUTTON_CHANGE_DATA {
6857    fn default() -> Self {
6858        Self::DEFAULT.clone()
6859    }
6860}
6861impl MessageData for BUTTON_CHANGE_DATA {
6862    type Message = MavMessage;
6863    const ID: u32 = 257u32;
6864    const NAME: &'static str = "BUTTON_CHANGE";
6865    const EXTRA_CRC: u8 = 131u8;
6866    const ENCODED_LEN: usize = 9usize;
6867    fn deser(
6868        _version: MavlinkVersion,
6869        __input: &[u8],
6870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6871        let avail_len = __input.len();
6872        let mut payload_buf = [0; Self::ENCODED_LEN];
6873        let mut buf = if avail_len < Self::ENCODED_LEN {
6874            payload_buf[0..avail_len].copy_from_slice(__input);
6875            Bytes::new(&payload_buf)
6876        } else {
6877            Bytes::new(__input)
6878        };
6879        let mut __struct = Self::default();
6880        __struct.time_boot_ms = buf.get_u32_le();
6881        __struct.last_change_ms = buf.get_u32_le();
6882        __struct.state = buf.get_u8();
6883        Ok(__struct)
6884    }
6885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6886        let mut __tmp = BytesMut::new(bytes);
6887        #[allow(clippy::absurd_extreme_comparisons)]
6888        #[allow(unused_comparisons)]
6889        if __tmp.remaining() < Self::ENCODED_LEN {
6890            panic!(
6891                "buffer is too small (need {} bytes, but got {})",
6892                Self::ENCODED_LEN,
6893                __tmp.remaining(),
6894            )
6895        }
6896        __tmp.put_u32_le(self.time_boot_ms);
6897        __tmp.put_u32_le(self.last_change_ms);
6898        __tmp.put_u8(self.state);
6899        if matches!(version, MavlinkVersion::V2) {
6900            let len = __tmp.len();
6901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6902        } else {
6903            __tmp.len()
6904        }
6905    }
6906}
6907#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6908#[doc = ""]
6909#[doc = "ID: 262"]
6910#[derive(Debug, Clone, PartialEq)]
6911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6913#[cfg_attr(feature = "ts", derive(TS))]
6914#[cfg_attr(feature = "ts", ts(export))]
6915pub struct CAMERA_CAPTURE_STATUS_DATA {
6916    #[doc = "Timestamp (time since system boot)."]
6917    pub time_boot_ms: u32,
6918    #[doc = "Image capture interval"]
6919    pub image_interval: f32,
6920    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6921    pub recording_time_ms: u32,
6922    #[doc = "Available storage capacity."]
6923    pub available_capacity: f32,
6924    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6925    pub image_status: u8,
6926    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6927    pub video_status: u8,
6928    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6929    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6930    pub image_count: i32,
6931    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6932    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6933    pub camera_device_id: u8,
6934}
6935impl CAMERA_CAPTURE_STATUS_DATA {
6936    pub const ENCODED_LEN: usize = 23usize;
6937    pub const DEFAULT: Self = Self {
6938        time_boot_ms: 0_u32,
6939        image_interval: 0.0_f32,
6940        recording_time_ms: 0_u32,
6941        available_capacity: 0.0_f32,
6942        image_status: 0_u8,
6943        video_status: 0_u8,
6944        image_count: 0_i32,
6945        camera_device_id: 0_u8,
6946    };
6947    #[cfg(feature = "arbitrary")]
6948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6949        use arbitrary::{Arbitrary, Unstructured};
6950        let mut buf = [0u8; 1024];
6951        rng.fill_bytes(&mut buf);
6952        let mut unstructured = Unstructured::new(&buf);
6953        Self::arbitrary(&mut unstructured).unwrap_or_default()
6954    }
6955}
6956impl Default for CAMERA_CAPTURE_STATUS_DATA {
6957    fn default() -> Self {
6958        Self::DEFAULT.clone()
6959    }
6960}
6961impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6962    type Message = MavMessage;
6963    const ID: u32 = 262u32;
6964    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6965    const EXTRA_CRC: u8 = 12u8;
6966    const ENCODED_LEN: usize = 23usize;
6967    fn deser(
6968        _version: MavlinkVersion,
6969        __input: &[u8],
6970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6971        let avail_len = __input.len();
6972        let mut payload_buf = [0; Self::ENCODED_LEN];
6973        let mut buf = if avail_len < Self::ENCODED_LEN {
6974            payload_buf[0..avail_len].copy_from_slice(__input);
6975            Bytes::new(&payload_buf)
6976        } else {
6977            Bytes::new(__input)
6978        };
6979        let mut __struct = Self::default();
6980        __struct.time_boot_ms = buf.get_u32_le();
6981        __struct.image_interval = buf.get_f32_le();
6982        __struct.recording_time_ms = buf.get_u32_le();
6983        __struct.available_capacity = buf.get_f32_le();
6984        __struct.image_status = buf.get_u8();
6985        __struct.video_status = buf.get_u8();
6986        __struct.image_count = buf.get_i32_le();
6987        __struct.camera_device_id = buf.get_u8();
6988        Ok(__struct)
6989    }
6990    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6991        let mut __tmp = BytesMut::new(bytes);
6992        #[allow(clippy::absurd_extreme_comparisons)]
6993        #[allow(unused_comparisons)]
6994        if __tmp.remaining() < Self::ENCODED_LEN {
6995            panic!(
6996                "buffer is too small (need {} bytes, but got {})",
6997                Self::ENCODED_LEN,
6998                __tmp.remaining(),
6999            )
7000        }
7001        __tmp.put_u32_le(self.time_boot_ms);
7002        __tmp.put_f32_le(self.image_interval);
7003        __tmp.put_u32_le(self.recording_time_ms);
7004        __tmp.put_f32_le(self.available_capacity);
7005        __tmp.put_u8(self.image_status);
7006        __tmp.put_u8(self.video_status);
7007        if matches!(version, MavlinkVersion::V2) {
7008            __tmp.put_i32_le(self.image_count);
7009            __tmp.put_u8(self.camera_device_id);
7010            let len = __tmp.len();
7011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7012        } else {
7013            __tmp.len()
7014        }
7015    }
7016}
7017#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7018#[doc = ""]
7019#[doc = "ID: 271"]
7020#[derive(Debug, Clone, PartialEq)]
7021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7023#[cfg_attr(feature = "ts", derive(TS))]
7024#[cfg_attr(feature = "ts", ts(export))]
7025pub struct CAMERA_FOV_STATUS_DATA {
7026    #[doc = "Timestamp (time since system boot)."]
7027    pub time_boot_ms: u32,
7028    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7029    pub lat_camera: i32,
7030    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7031    pub lon_camera: i32,
7032    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7033    pub alt_camera: i32,
7034    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7035    pub lat_image: i32,
7036    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7037    pub lon_image: i32,
7038    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7039    pub alt_image: i32,
7040    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7041    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7042    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7043    pub q: [f32; 4],
7044    #[doc = "Horizontal field of view (NaN if unknown)."]
7045    pub hfov: f32,
7046    #[doc = "Vertical field of view (NaN if unknown)."]
7047    pub vfov: f32,
7048    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7049    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7050    pub camera_device_id: u8,
7051}
7052impl CAMERA_FOV_STATUS_DATA {
7053    pub const ENCODED_LEN: usize = 53usize;
7054    pub const DEFAULT: Self = Self {
7055        time_boot_ms: 0_u32,
7056        lat_camera: 0_i32,
7057        lon_camera: 0_i32,
7058        alt_camera: 0_i32,
7059        lat_image: 0_i32,
7060        lon_image: 0_i32,
7061        alt_image: 0_i32,
7062        q: [0.0_f32; 4usize],
7063        hfov: 0.0_f32,
7064        vfov: 0.0_f32,
7065        camera_device_id: 0_u8,
7066    };
7067    #[cfg(feature = "arbitrary")]
7068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7069        use arbitrary::{Arbitrary, Unstructured};
7070        let mut buf = [0u8; 1024];
7071        rng.fill_bytes(&mut buf);
7072        let mut unstructured = Unstructured::new(&buf);
7073        Self::arbitrary(&mut unstructured).unwrap_or_default()
7074    }
7075}
7076impl Default for CAMERA_FOV_STATUS_DATA {
7077    fn default() -> Self {
7078        Self::DEFAULT.clone()
7079    }
7080}
7081impl MessageData for CAMERA_FOV_STATUS_DATA {
7082    type Message = MavMessage;
7083    const ID: u32 = 271u32;
7084    const NAME: &'static str = "CAMERA_FOV_STATUS";
7085    const EXTRA_CRC: u8 = 22u8;
7086    const ENCODED_LEN: usize = 53usize;
7087    fn deser(
7088        _version: MavlinkVersion,
7089        __input: &[u8],
7090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7091        let avail_len = __input.len();
7092        let mut payload_buf = [0; Self::ENCODED_LEN];
7093        let mut buf = if avail_len < Self::ENCODED_LEN {
7094            payload_buf[0..avail_len].copy_from_slice(__input);
7095            Bytes::new(&payload_buf)
7096        } else {
7097            Bytes::new(__input)
7098        };
7099        let mut __struct = Self::default();
7100        __struct.time_boot_ms = buf.get_u32_le();
7101        __struct.lat_camera = buf.get_i32_le();
7102        __struct.lon_camera = buf.get_i32_le();
7103        __struct.alt_camera = buf.get_i32_le();
7104        __struct.lat_image = buf.get_i32_le();
7105        __struct.lon_image = buf.get_i32_le();
7106        __struct.alt_image = buf.get_i32_le();
7107        for v in &mut __struct.q {
7108            let val = buf.get_f32_le();
7109            *v = val;
7110        }
7111        __struct.hfov = buf.get_f32_le();
7112        __struct.vfov = buf.get_f32_le();
7113        __struct.camera_device_id = buf.get_u8();
7114        Ok(__struct)
7115    }
7116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7117        let mut __tmp = BytesMut::new(bytes);
7118        #[allow(clippy::absurd_extreme_comparisons)]
7119        #[allow(unused_comparisons)]
7120        if __tmp.remaining() < Self::ENCODED_LEN {
7121            panic!(
7122                "buffer is too small (need {} bytes, but got {})",
7123                Self::ENCODED_LEN,
7124                __tmp.remaining(),
7125            )
7126        }
7127        __tmp.put_u32_le(self.time_boot_ms);
7128        __tmp.put_i32_le(self.lat_camera);
7129        __tmp.put_i32_le(self.lon_camera);
7130        __tmp.put_i32_le(self.alt_camera);
7131        __tmp.put_i32_le(self.lat_image);
7132        __tmp.put_i32_le(self.lon_image);
7133        __tmp.put_i32_le(self.alt_image);
7134        for val in &self.q {
7135            __tmp.put_f32_le(*val);
7136        }
7137        __tmp.put_f32_le(self.hfov);
7138        __tmp.put_f32_le(self.vfov);
7139        if matches!(version, MavlinkVersion::V2) {
7140            __tmp.put_u8(self.camera_device_id);
7141            let len = __tmp.len();
7142            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7143        } else {
7144            __tmp.len()
7145        }
7146    }
7147}
7148#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7149#[doc = ""]
7150#[doc = "ID: 263"]
7151#[derive(Debug, Clone, PartialEq)]
7152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7154#[cfg_attr(feature = "ts", derive(TS))]
7155#[cfg_attr(feature = "ts", ts(export))]
7156pub struct CAMERA_IMAGE_CAPTURED_DATA {
7157    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7158    pub time_utc: u64,
7159    #[doc = "Timestamp (time since system boot)."]
7160    pub time_boot_ms: u32,
7161    #[doc = "Latitude where image was taken"]
7162    pub lat: i32,
7163    #[doc = "Longitude where capture was taken"]
7164    pub lon: i32,
7165    #[doc = "Altitude (MSL) where image was taken"]
7166    pub alt: i32,
7167    #[doc = "Altitude above ground"]
7168    pub relative_alt: i32,
7169    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7172    pub q: [f32; 4],
7173    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7174    pub image_index: i32,
7175    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7176    pub camera_id: u8,
7177    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7178    pub capture_result: i8,
7179    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7180    #[cfg_attr(feature = "ts", ts(type = "string"))]
7181    pub file_url: CharArray<205>,
7182}
7183impl CAMERA_IMAGE_CAPTURED_DATA {
7184    pub const ENCODED_LEN: usize = 255usize;
7185    pub const DEFAULT: Self = Self {
7186        time_utc: 0_u64,
7187        time_boot_ms: 0_u32,
7188        lat: 0_i32,
7189        lon: 0_i32,
7190        alt: 0_i32,
7191        relative_alt: 0_i32,
7192        q: [0.0_f32; 4usize],
7193        image_index: 0_i32,
7194        camera_id: 0_u8,
7195        capture_result: 0_i8,
7196        file_url: CharArray::new([0_u8; 205usize]),
7197    };
7198    #[cfg(feature = "arbitrary")]
7199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7200        use arbitrary::{Arbitrary, Unstructured};
7201        let mut buf = [0u8; 1024];
7202        rng.fill_bytes(&mut buf);
7203        let mut unstructured = Unstructured::new(&buf);
7204        Self::arbitrary(&mut unstructured).unwrap_or_default()
7205    }
7206}
7207impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7208    fn default() -> Self {
7209        Self::DEFAULT.clone()
7210    }
7211}
7212impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7213    type Message = MavMessage;
7214    const ID: u32 = 263u32;
7215    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7216    const EXTRA_CRC: u8 = 133u8;
7217    const ENCODED_LEN: usize = 255usize;
7218    fn deser(
7219        _version: MavlinkVersion,
7220        __input: &[u8],
7221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7222        let avail_len = __input.len();
7223        let mut payload_buf = [0; Self::ENCODED_LEN];
7224        let mut buf = if avail_len < Self::ENCODED_LEN {
7225            payload_buf[0..avail_len].copy_from_slice(__input);
7226            Bytes::new(&payload_buf)
7227        } else {
7228            Bytes::new(__input)
7229        };
7230        let mut __struct = Self::default();
7231        __struct.time_utc = buf.get_u64_le();
7232        __struct.time_boot_ms = buf.get_u32_le();
7233        __struct.lat = buf.get_i32_le();
7234        __struct.lon = buf.get_i32_le();
7235        __struct.alt = buf.get_i32_le();
7236        __struct.relative_alt = buf.get_i32_le();
7237        for v in &mut __struct.q {
7238            let val = buf.get_f32_le();
7239            *v = val;
7240        }
7241        __struct.image_index = buf.get_i32_le();
7242        __struct.camera_id = buf.get_u8();
7243        __struct.capture_result = buf.get_i8();
7244        let mut tmp = [0_u8; 205usize];
7245        for v in &mut tmp {
7246            *v = buf.get_u8();
7247        }
7248        __struct.file_url = CharArray::new(tmp);
7249        Ok(__struct)
7250    }
7251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7252        let mut __tmp = BytesMut::new(bytes);
7253        #[allow(clippy::absurd_extreme_comparisons)]
7254        #[allow(unused_comparisons)]
7255        if __tmp.remaining() < Self::ENCODED_LEN {
7256            panic!(
7257                "buffer is too small (need {} bytes, but got {})",
7258                Self::ENCODED_LEN,
7259                __tmp.remaining(),
7260            )
7261        }
7262        __tmp.put_u64_le(self.time_utc);
7263        __tmp.put_u32_le(self.time_boot_ms);
7264        __tmp.put_i32_le(self.lat);
7265        __tmp.put_i32_le(self.lon);
7266        __tmp.put_i32_le(self.alt);
7267        __tmp.put_i32_le(self.relative_alt);
7268        for val in &self.q {
7269            __tmp.put_f32_le(*val);
7270        }
7271        __tmp.put_i32_le(self.image_index);
7272        __tmp.put_u8(self.camera_id);
7273        __tmp.put_i8(self.capture_result);
7274        for val in &self.file_url {
7275            __tmp.put_u8(*val);
7276        }
7277        if matches!(version, MavlinkVersion::V2) {
7278            let len = __tmp.len();
7279            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7280        } else {
7281            __tmp.len()
7282        }
7283    }
7284}
7285#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7286#[doc = ""]
7287#[doc = "ID: 259"]
7288#[derive(Debug, Clone, PartialEq)]
7289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7291#[cfg_attr(feature = "ts", derive(TS))]
7292#[cfg_attr(feature = "ts", ts(export))]
7293pub struct CAMERA_INFORMATION_DATA {
7294    #[doc = "Timestamp (time since system boot)."]
7295    pub time_boot_ms: u32,
7296    #[doc = "0xff). Use 0 if not known."]
7297    pub firmware_version: u32,
7298    #[doc = "Focal length. Use NaN if not known."]
7299    pub focal_length: f32,
7300    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7301    pub sensor_size_h: f32,
7302    #[doc = "Image sensor size vertical. Use NaN if not known."]
7303    pub sensor_size_v: f32,
7304    #[doc = "Bitmap of camera capability flags."]
7305    pub flags: CameraCapFlags,
7306    #[doc = "Horizontal image resolution. Use 0 if not known."]
7307    pub resolution_h: u16,
7308    #[doc = "Vertical image resolution. Use 0 if not known."]
7309    pub resolution_v: u16,
7310    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7311    pub cam_definition_version: u16,
7312    #[doc = "Name of the camera vendor"]
7313    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7314    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7315    pub vendor_name: [u8; 32],
7316    #[doc = "Name of the camera model"]
7317    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7318    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7319    pub model_name: [u8; 32],
7320    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7321    pub lens_id: u8,
7322    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7323    #[cfg_attr(feature = "ts", ts(type = "string"))]
7324    pub cam_definition_uri: CharArray<140>,
7325    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7327    pub gimbal_device_id: u8,
7328    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7330    pub camera_device_id: u8,
7331}
7332impl CAMERA_INFORMATION_DATA {
7333    pub const ENCODED_LEN: usize = 237usize;
7334    pub const DEFAULT: Self = Self {
7335        time_boot_ms: 0_u32,
7336        firmware_version: 0_u32,
7337        focal_length: 0.0_f32,
7338        sensor_size_h: 0.0_f32,
7339        sensor_size_v: 0.0_f32,
7340        flags: CameraCapFlags::DEFAULT,
7341        resolution_h: 0_u16,
7342        resolution_v: 0_u16,
7343        cam_definition_version: 0_u16,
7344        vendor_name: [0_u8; 32usize],
7345        model_name: [0_u8; 32usize],
7346        lens_id: 0_u8,
7347        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7348        gimbal_device_id: 0_u8,
7349        camera_device_id: 0_u8,
7350    };
7351    #[cfg(feature = "arbitrary")]
7352    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7353        use arbitrary::{Arbitrary, Unstructured};
7354        let mut buf = [0u8; 1024];
7355        rng.fill_bytes(&mut buf);
7356        let mut unstructured = Unstructured::new(&buf);
7357        Self::arbitrary(&mut unstructured).unwrap_or_default()
7358    }
7359}
7360impl Default for CAMERA_INFORMATION_DATA {
7361    fn default() -> Self {
7362        Self::DEFAULT.clone()
7363    }
7364}
7365impl MessageData for CAMERA_INFORMATION_DATA {
7366    type Message = MavMessage;
7367    const ID: u32 = 259u32;
7368    const NAME: &'static str = "CAMERA_INFORMATION";
7369    const EXTRA_CRC: u8 = 92u8;
7370    const ENCODED_LEN: usize = 237usize;
7371    fn deser(
7372        _version: MavlinkVersion,
7373        __input: &[u8],
7374    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7375        let avail_len = __input.len();
7376        let mut payload_buf = [0; Self::ENCODED_LEN];
7377        let mut buf = if avail_len < Self::ENCODED_LEN {
7378            payload_buf[0..avail_len].copy_from_slice(__input);
7379            Bytes::new(&payload_buf)
7380        } else {
7381            Bytes::new(__input)
7382        };
7383        let mut __struct = Self::default();
7384        __struct.time_boot_ms = buf.get_u32_le();
7385        __struct.firmware_version = buf.get_u32_le();
7386        __struct.focal_length = buf.get_f32_le();
7387        __struct.sensor_size_h = buf.get_f32_le();
7388        __struct.sensor_size_v = buf.get_f32_le();
7389        let tmp = buf.get_u32_le();
7390        __struct.flags = CameraCapFlags::from_bits(tmp).ok_or(
7391            ::mavlink_core::error::ParserError::InvalidFlag {
7392                flag_type: "CameraCapFlags",
7393                value: tmp as u64,
7394            },
7395        )?;
7396        __struct.resolution_h = buf.get_u16_le();
7397        __struct.resolution_v = buf.get_u16_le();
7398        __struct.cam_definition_version = buf.get_u16_le();
7399        for v in &mut __struct.vendor_name {
7400            let val = buf.get_u8();
7401            *v = val;
7402        }
7403        for v in &mut __struct.model_name {
7404            let val = buf.get_u8();
7405            *v = val;
7406        }
7407        __struct.lens_id = buf.get_u8();
7408        let mut tmp = [0_u8; 140usize];
7409        for v in &mut tmp {
7410            *v = buf.get_u8();
7411        }
7412        __struct.cam_definition_uri = CharArray::new(tmp);
7413        __struct.gimbal_device_id = buf.get_u8();
7414        __struct.camera_device_id = buf.get_u8();
7415        Ok(__struct)
7416    }
7417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7418        let mut __tmp = BytesMut::new(bytes);
7419        #[allow(clippy::absurd_extreme_comparisons)]
7420        #[allow(unused_comparisons)]
7421        if __tmp.remaining() < Self::ENCODED_LEN {
7422            panic!(
7423                "buffer is too small (need {} bytes, but got {})",
7424                Self::ENCODED_LEN,
7425                __tmp.remaining(),
7426            )
7427        }
7428        __tmp.put_u32_le(self.time_boot_ms);
7429        __tmp.put_u32_le(self.firmware_version);
7430        __tmp.put_f32_le(self.focal_length);
7431        __tmp.put_f32_le(self.sensor_size_h);
7432        __tmp.put_f32_le(self.sensor_size_v);
7433        __tmp.put_u32_le(self.flags.bits());
7434        __tmp.put_u16_le(self.resolution_h);
7435        __tmp.put_u16_le(self.resolution_v);
7436        __tmp.put_u16_le(self.cam_definition_version);
7437        for val in &self.vendor_name {
7438            __tmp.put_u8(*val);
7439        }
7440        for val in &self.model_name {
7441            __tmp.put_u8(*val);
7442        }
7443        __tmp.put_u8(self.lens_id);
7444        for val in &self.cam_definition_uri {
7445            __tmp.put_u8(*val);
7446        }
7447        if matches!(version, MavlinkVersion::V2) {
7448            __tmp.put_u8(self.gimbal_device_id);
7449            __tmp.put_u8(self.camera_device_id);
7450            let len = __tmp.len();
7451            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7452        } else {
7453            __tmp.len()
7454        }
7455    }
7456}
7457#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7458#[doc = ""]
7459#[doc = "ID: 260"]
7460#[derive(Debug, Clone, PartialEq)]
7461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7463#[cfg_attr(feature = "ts", derive(TS))]
7464#[cfg_attr(feature = "ts", ts(export))]
7465pub struct CAMERA_SETTINGS_DATA {
7466    #[doc = "Timestamp (time since system boot)."]
7467    pub time_boot_ms: u32,
7468    #[doc = "Camera mode"]
7469    pub mode_id: CameraMode,
7470    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7471    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7472    pub zoomLevel: f32,
7473    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7474    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7475    pub focusLevel: f32,
7476    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7477    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7478    pub camera_device_id: u8,
7479}
7480impl CAMERA_SETTINGS_DATA {
7481    pub const ENCODED_LEN: usize = 14usize;
7482    pub const DEFAULT: Self = Self {
7483        time_boot_ms: 0_u32,
7484        mode_id: CameraMode::DEFAULT,
7485        zoomLevel: 0.0_f32,
7486        focusLevel: 0.0_f32,
7487        camera_device_id: 0_u8,
7488    };
7489    #[cfg(feature = "arbitrary")]
7490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7491        use arbitrary::{Arbitrary, Unstructured};
7492        let mut buf = [0u8; 1024];
7493        rng.fill_bytes(&mut buf);
7494        let mut unstructured = Unstructured::new(&buf);
7495        Self::arbitrary(&mut unstructured).unwrap_or_default()
7496    }
7497}
7498impl Default for CAMERA_SETTINGS_DATA {
7499    fn default() -> Self {
7500        Self::DEFAULT.clone()
7501    }
7502}
7503impl MessageData for CAMERA_SETTINGS_DATA {
7504    type Message = MavMessage;
7505    const ID: u32 = 260u32;
7506    const NAME: &'static str = "CAMERA_SETTINGS";
7507    const EXTRA_CRC: u8 = 146u8;
7508    const ENCODED_LEN: usize = 14usize;
7509    fn deser(
7510        _version: MavlinkVersion,
7511        __input: &[u8],
7512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7513        let avail_len = __input.len();
7514        let mut payload_buf = [0; Self::ENCODED_LEN];
7515        let mut buf = if avail_len < Self::ENCODED_LEN {
7516            payload_buf[0..avail_len].copy_from_slice(__input);
7517            Bytes::new(&payload_buf)
7518        } else {
7519            Bytes::new(__input)
7520        };
7521        let mut __struct = Self::default();
7522        __struct.time_boot_ms = buf.get_u32_le();
7523        let tmp = buf.get_u8();
7524        __struct.mode_id =
7525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7526                enum_type: "CameraMode",
7527                value: tmp as u64,
7528            })?;
7529        __struct.zoomLevel = buf.get_f32_le();
7530        __struct.focusLevel = buf.get_f32_le();
7531        __struct.camera_device_id = buf.get_u8();
7532        Ok(__struct)
7533    }
7534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7535        let mut __tmp = BytesMut::new(bytes);
7536        #[allow(clippy::absurd_extreme_comparisons)]
7537        #[allow(unused_comparisons)]
7538        if __tmp.remaining() < Self::ENCODED_LEN {
7539            panic!(
7540                "buffer is too small (need {} bytes, but got {})",
7541                Self::ENCODED_LEN,
7542                __tmp.remaining(),
7543            )
7544        }
7545        __tmp.put_u32_le(self.time_boot_ms);
7546        __tmp.put_u8(self.mode_id as u8);
7547        if matches!(version, MavlinkVersion::V2) {
7548            __tmp.put_f32_le(self.zoomLevel);
7549            __tmp.put_f32_le(self.focusLevel);
7550            __tmp.put_u8(self.camera_device_id);
7551            let len = __tmp.len();
7552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7553        } else {
7554            __tmp.len()
7555        }
7556    }
7557}
7558#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7559#[doc = ""]
7560#[doc = "ID: 277"]
7561#[derive(Debug, Clone, PartialEq)]
7562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7564#[cfg_attr(feature = "ts", derive(TS))]
7565#[cfg_attr(feature = "ts", ts(export))]
7566pub struct CAMERA_THERMAL_RANGE_DATA {
7567    #[doc = "Timestamp (time since system boot)."]
7568    pub time_boot_ms: u32,
7569    #[doc = "Temperature max."]
7570    pub max: f32,
7571    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7572    pub max_point_x: f32,
7573    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7574    pub max_point_y: f32,
7575    #[doc = "Temperature min."]
7576    pub min: f32,
7577    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7578    pub min_point_x: f32,
7579    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7580    pub min_point_y: f32,
7581    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7582    pub stream_id: u8,
7583    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7584    pub camera_device_id: u8,
7585}
7586impl CAMERA_THERMAL_RANGE_DATA {
7587    pub const ENCODED_LEN: usize = 30usize;
7588    pub const DEFAULT: Self = Self {
7589        time_boot_ms: 0_u32,
7590        max: 0.0_f32,
7591        max_point_x: 0.0_f32,
7592        max_point_y: 0.0_f32,
7593        min: 0.0_f32,
7594        min_point_x: 0.0_f32,
7595        min_point_y: 0.0_f32,
7596        stream_id: 0_u8,
7597        camera_device_id: 0_u8,
7598    };
7599    #[cfg(feature = "arbitrary")]
7600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7601        use arbitrary::{Arbitrary, Unstructured};
7602        let mut buf = [0u8; 1024];
7603        rng.fill_bytes(&mut buf);
7604        let mut unstructured = Unstructured::new(&buf);
7605        Self::arbitrary(&mut unstructured).unwrap_or_default()
7606    }
7607}
7608impl Default for CAMERA_THERMAL_RANGE_DATA {
7609    fn default() -> Self {
7610        Self::DEFAULT.clone()
7611    }
7612}
7613impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7614    type Message = MavMessage;
7615    const ID: u32 = 277u32;
7616    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7617    const EXTRA_CRC: u8 = 62u8;
7618    const ENCODED_LEN: usize = 30usize;
7619    fn deser(
7620        _version: MavlinkVersion,
7621        __input: &[u8],
7622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7623        let avail_len = __input.len();
7624        let mut payload_buf = [0; Self::ENCODED_LEN];
7625        let mut buf = if avail_len < Self::ENCODED_LEN {
7626            payload_buf[0..avail_len].copy_from_slice(__input);
7627            Bytes::new(&payload_buf)
7628        } else {
7629            Bytes::new(__input)
7630        };
7631        let mut __struct = Self::default();
7632        __struct.time_boot_ms = buf.get_u32_le();
7633        __struct.max = buf.get_f32_le();
7634        __struct.max_point_x = buf.get_f32_le();
7635        __struct.max_point_y = buf.get_f32_le();
7636        __struct.min = buf.get_f32_le();
7637        __struct.min_point_x = buf.get_f32_le();
7638        __struct.min_point_y = buf.get_f32_le();
7639        __struct.stream_id = buf.get_u8();
7640        __struct.camera_device_id = buf.get_u8();
7641        Ok(__struct)
7642    }
7643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7644        let mut __tmp = BytesMut::new(bytes);
7645        #[allow(clippy::absurd_extreme_comparisons)]
7646        #[allow(unused_comparisons)]
7647        if __tmp.remaining() < Self::ENCODED_LEN {
7648            panic!(
7649                "buffer is too small (need {} bytes, but got {})",
7650                Self::ENCODED_LEN,
7651                __tmp.remaining(),
7652            )
7653        }
7654        __tmp.put_u32_le(self.time_boot_ms);
7655        __tmp.put_f32_le(self.max);
7656        __tmp.put_f32_le(self.max_point_x);
7657        __tmp.put_f32_le(self.max_point_y);
7658        __tmp.put_f32_le(self.min);
7659        __tmp.put_f32_le(self.min_point_x);
7660        __tmp.put_f32_le(self.min_point_y);
7661        __tmp.put_u8(self.stream_id);
7662        __tmp.put_u8(self.camera_device_id);
7663        if matches!(version, MavlinkVersion::V2) {
7664            let len = __tmp.len();
7665            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7666        } else {
7667            __tmp.len()
7668        }
7669    }
7670}
7671#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7672#[doc = ""]
7673#[doc = "ID: 276"]
7674#[derive(Debug, Clone, PartialEq)]
7675#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7676#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7677#[cfg_attr(feature = "ts", derive(TS))]
7678#[cfg_attr(feature = "ts", ts(export))]
7679pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7680    #[doc = "Latitude of tracked object"]
7681    pub lat: i32,
7682    #[doc = "Longitude of tracked object"]
7683    pub lon: i32,
7684    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7685    pub alt: f32,
7686    #[doc = "Horizontal accuracy. NAN if unknown"]
7687    pub h_acc: f32,
7688    #[doc = "Vertical accuracy. NAN if unknown"]
7689    pub v_acc: f32,
7690    #[doc = "North velocity of tracked object. NAN if unknown"]
7691    pub vel_n: f32,
7692    #[doc = "East velocity of tracked object. NAN if unknown"]
7693    pub vel_e: f32,
7694    #[doc = "Down velocity of tracked object. NAN if unknown"]
7695    pub vel_d: f32,
7696    #[doc = "Velocity accuracy. NAN if unknown"]
7697    pub vel_acc: f32,
7698    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7699    pub dist: f32,
7700    #[doc = "Heading in radians, in NED. NAN if unknown"]
7701    pub hdg: f32,
7702    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7703    pub hdg_acc: f32,
7704    #[doc = "Current tracking status"]
7705    pub tracking_status: CameraTrackingStatusFlags,
7706    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7707    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7708    pub camera_device_id: u8,
7709}
7710impl CAMERA_TRACKING_GEO_STATUS_DATA {
7711    pub const ENCODED_LEN: usize = 50usize;
7712    pub const DEFAULT: Self = Self {
7713        lat: 0_i32,
7714        lon: 0_i32,
7715        alt: 0.0_f32,
7716        h_acc: 0.0_f32,
7717        v_acc: 0.0_f32,
7718        vel_n: 0.0_f32,
7719        vel_e: 0.0_f32,
7720        vel_d: 0.0_f32,
7721        vel_acc: 0.0_f32,
7722        dist: 0.0_f32,
7723        hdg: 0.0_f32,
7724        hdg_acc: 0.0_f32,
7725        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7726        camera_device_id: 0_u8,
7727    };
7728    #[cfg(feature = "arbitrary")]
7729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7730        use arbitrary::{Arbitrary, Unstructured};
7731        let mut buf = [0u8; 1024];
7732        rng.fill_bytes(&mut buf);
7733        let mut unstructured = Unstructured::new(&buf);
7734        Self::arbitrary(&mut unstructured).unwrap_or_default()
7735    }
7736}
7737impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7738    fn default() -> Self {
7739        Self::DEFAULT.clone()
7740    }
7741}
7742impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7743    type Message = MavMessage;
7744    const ID: u32 = 276u32;
7745    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7746    const EXTRA_CRC: u8 = 18u8;
7747    const ENCODED_LEN: usize = 50usize;
7748    fn deser(
7749        _version: MavlinkVersion,
7750        __input: &[u8],
7751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7752        let avail_len = __input.len();
7753        let mut payload_buf = [0; Self::ENCODED_LEN];
7754        let mut buf = if avail_len < Self::ENCODED_LEN {
7755            payload_buf[0..avail_len].copy_from_slice(__input);
7756            Bytes::new(&payload_buf)
7757        } else {
7758            Bytes::new(__input)
7759        };
7760        let mut __struct = Self::default();
7761        __struct.lat = buf.get_i32_le();
7762        __struct.lon = buf.get_i32_le();
7763        __struct.alt = buf.get_f32_le();
7764        __struct.h_acc = buf.get_f32_le();
7765        __struct.v_acc = buf.get_f32_le();
7766        __struct.vel_n = buf.get_f32_le();
7767        __struct.vel_e = buf.get_f32_le();
7768        __struct.vel_d = buf.get_f32_le();
7769        __struct.vel_acc = buf.get_f32_le();
7770        __struct.dist = buf.get_f32_le();
7771        __struct.hdg = buf.get_f32_le();
7772        __struct.hdg_acc = buf.get_f32_le();
7773        let tmp = buf.get_u8();
7774        __struct.tracking_status =
7775            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7776                enum_type: "CameraTrackingStatusFlags",
7777                value: tmp as u64,
7778            })?;
7779        __struct.camera_device_id = buf.get_u8();
7780        Ok(__struct)
7781    }
7782    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7783        let mut __tmp = BytesMut::new(bytes);
7784        #[allow(clippy::absurd_extreme_comparisons)]
7785        #[allow(unused_comparisons)]
7786        if __tmp.remaining() < Self::ENCODED_LEN {
7787            panic!(
7788                "buffer is too small (need {} bytes, but got {})",
7789                Self::ENCODED_LEN,
7790                __tmp.remaining(),
7791            )
7792        }
7793        __tmp.put_i32_le(self.lat);
7794        __tmp.put_i32_le(self.lon);
7795        __tmp.put_f32_le(self.alt);
7796        __tmp.put_f32_le(self.h_acc);
7797        __tmp.put_f32_le(self.v_acc);
7798        __tmp.put_f32_le(self.vel_n);
7799        __tmp.put_f32_le(self.vel_e);
7800        __tmp.put_f32_le(self.vel_d);
7801        __tmp.put_f32_le(self.vel_acc);
7802        __tmp.put_f32_le(self.dist);
7803        __tmp.put_f32_le(self.hdg);
7804        __tmp.put_f32_le(self.hdg_acc);
7805        __tmp.put_u8(self.tracking_status as u8);
7806        if matches!(version, MavlinkVersion::V2) {
7807            __tmp.put_u8(self.camera_device_id);
7808            let len = __tmp.len();
7809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7810        } else {
7811            __tmp.len()
7812        }
7813    }
7814}
7815#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7816#[doc = ""]
7817#[doc = "ID: 275"]
7818#[derive(Debug, Clone, PartialEq)]
7819#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7821#[cfg_attr(feature = "ts", derive(TS))]
7822#[cfg_attr(feature = "ts", ts(export))]
7823pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7824    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7825    pub point_x: f32,
7826    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7827    pub point_y: f32,
7828    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7829    pub radius: f32,
7830    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7831    pub rec_top_x: f32,
7832    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7833    pub rec_top_y: f32,
7834    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7835    pub rec_bottom_x: f32,
7836    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7837    pub rec_bottom_y: f32,
7838    #[doc = "Current tracking status"]
7839    pub tracking_status: CameraTrackingStatusFlags,
7840    #[doc = "Current tracking mode"]
7841    pub tracking_mode: CameraTrackingMode,
7842    #[doc = "Defines location of target data"]
7843    pub target_data: CameraTrackingTargetData,
7844    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7846    pub camera_device_id: u8,
7847}
7848impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7849    pub const ENCODED_LEN: usize = 32usize;
7850    pub const DEFAULT: Self = Self {
7851        point_x: 0.0_f32,
7852        point_y: 0.0_f32,
7853        radius: 0.0_f32,
7854        rec_top_x: 0.0_f32,
7855        rec_top_y: 0.0_f32,
7856        rec_bottom_x: 0.0_f32,
7857        rec_bottom_y: 0.0_f32,
7858        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7859        tracking_mode: CameraTrackingMode::DEFAULT,
7860        target_data: CameraTrackingTargetData::DEFAULT,
7861        camera_device_id: 0_u8,
7862    };
7863    #[cfg(feature = "arbitrary")]
7864    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7865        use arbitrary::{Arbitrary, Unstructured};
7866        let mut buf = [0u8; 1024];
7867        rng.fill_bytes(&mut buf);
7868        let mut unstructured = Unstructured::new(&buf);
7869        Self::arbitrary(&mut unstructured).unwrap_or_default()
7870    }
7871}
7872impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7873    fn default() -> Self {
7874        Self::DEFAULT.clone()
7875    }
7876}
7877impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7878    type Message = MavMessage;
7879    const ID: u32 = 275u32;
7880    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7881    const EXTRA_CRC: u8 = 126u8;
7882    const ENCODED_LEN: usize = 32usize;
7883    fn deser(
7884        _version: MavlinkVersion,
7885        __input: &[u8],
7886    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7887        let avail_len = __input.len();
7888        let mut payload_buf = [0; Self::ENCODED_LEN];
7889        let mut buf = if avail_len < Self::ENCODED_LEN {
7890            payload_buf[0..avail_len].copy_from_slice(__input);
7891            Bytes::new(&payload_buf)
7892        } else {
7893            Bytes::new(__input)
7894        };
7895        let mut __struct = Self::default();
7896        __struct.point_x = buf.get_f32_le();
7897        __struct.point_y = buf.get_f32_le();
7898        __struct.radius = buf.get_f32_le();
7899        __struct.rec_top_x = buf.get_f32_le();
7900        __struct.rec_top_y = buf.get_f32_le();
7901        __struct.rec_bottom_x = buf.get_f32_le();
7902        __struct.rec_bottom_y = buf.get_f32_le();
7903        let tmp = buf.get_u8();
7904        __struct.tracking_status =
7905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7906                enum_type: "CameraTrackingStatusFlags",
7907                value: tmp as u64,
7908            })?;
7909        let tmp = buf.get_u8();
7910        __struct.tracking_mode =
7911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7912                enum_type: "CameraTrackingMode",
7913                value: tmp as u64,
7914            })?;
7915        let tmp = buf.get_u8();
7916        __struct.target_data = CameraTrackingTargetData::from_bits(tmp).ok_or(
7917            ::mavlink_core::error::ParserError::InvalidFlag {
7918                flag_type: "CameraTrackingTargetData",
7919                value: tmp as u64,
7920            },
7921        )?;
7922        __struct.camera_device_id = buf.get_u8();
7923        Ok(__struct)
7924    }
7925    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7926        let mut __tmp = BytesMut::new(bytes);
7927        #[allow(clippy::absurd_extreme_comparisons)]
7928        #[allow(unused_comparisons)]
7929        if __tmp.remaining() < Self::ENCODED_LEN {
7930            panic!(
7931                "buffer is too small (need {} bytes, but got {})",
7932                Self::ENCODED_LEN,
7933                __tmp.remaining(),
7934            )
7935        }
7936        __tmp.put_f32_le(self.point_x);
7937        __tmp.put_f32_le(self.point_y);
7938        __tmp.put_f32_le(self.radius);
7939        __tmp.put_f32_le(self.rec_top_x);
7940        __tmp.put_f32_le(self.rec_top_y);
7941        __tmp.put_f32_le(self.rec_bottom_x);
7942        __tmp.put_f32_le(self.rec_bottom_y);
7943        __tmp.put_u8(self.tracking_status as u8);
7944        __tmp.put_u8(self.tracking_mode as u8);
7945        __tmp.put_u8(self.target_data.bits());
7946        if matches!(version, MavlinkVersion::V2) {
7947            __tmp.put_u8(self.camera_device_id);
7948            let len = __tmp.len();
7949            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7950        } else {
7951            __tmp.len()
7952        }
7953    }
7954}
7955#[doc = "Camera-IMU triggering and synchronisation message."]
7956#[doc = ""]
7957#[doc = "ID: 112"]
7958#[derive(Debug, Clone, PartialEq)]
7959#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7960#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7961#[cfg_attr(feature = "ts", derive(TS))]
7962#[cfg_attr(feature = "ts", ts(export))]
7963pub struct CAMERA_TRIGGER_DATA {
7964    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7965    pub time_usec: u64,
7966    #[doc = "Image frame sequence"]
7967    pub seq: u32,
7968}
7969impl CAMERA_TRIGGER_DATA {
7970    pub const ENCODED_LEN: usize = 12usize;
7971    pub const DEFAULT: Self = Self {
7972        time_usec: 0_u64,
7973        seq: 0_u32,
7974    };
7975    #[cfg(feature = "arbitrary")]
7976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7977        use arbitrary::{Arbitrary, Unstructured};
7978        let mut buf = [0u8; 1024];
7979        rng.fill_bytes(&mut buf);
7980        let mut unstructured = Unstructured::new(&buf);
7981        Self::arbitrary(&mut unstructured).unwrap_or_default()
7982    }
7983}
7984impl Default for CAMERA_TRIGGER_DATA {
7985    fn default() -> Self {
7986        Self::DEFAULT.clone()
7987    }
7988}
7989impl MessageData for CAMERA_TRIGGER_DATA {
7990    type Message = MavMessage;
7991    const ID: u32 = 112u32;
7992    const NAME: &'static str = "CAMERA_TRIGGER";
7993    const EXTRA_CRC: u8 = 174u8;
7994    const ENCODED_LEN: usize = 12usize;
7995    fn deser(
7996        _version: MavlinkVersion,
7997        __input: &[u8],
7998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7999        let avail_len = __input.len();
8000        let mut payload_buf = [0; Self::ENCODED_LEN];
8001        let mut buf = if avail_len < Self::ENCODED_LEN {
8002            payload_buf[0..avail_len].copy_from_slice(__input);
8003            Bytes::new(&payload_buf)
8004        } else {
8005            Bytes::new(__input)
8006        };
8007        let mut __struct = Self::default();
8008        __struct.time_usec = buf.get_u64_le();
8009        __struct.seq = buf.get_u32_le();
8010        Ok(__struct)
8011    }
8012    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8013        let mut __tmp = BytesMut::new(bytes);
8014        #[allow(clippy::absurd_extreme_comparisons)]
8015        #[allow(unused_comparisons)]
8016        if __tmp.remaining() < Self::ENCODED_LEN {
8017            panic!(
8018                "buffer is too small (need {} bytes, but got {})",
8019                Self::ENCODED_LEN,
8020                __tmp.remaining(),
8021            )
8022        }
8023        __tmp.put_u64_le(self.time_usec);
8024        __tmp.put_u32_le(self.seq);
8025        if matches!(version, MavlinkVersion::V2) {
8026            let len = __tmp.len();
8027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8028        } else {
8029            __tmp.len()
8030        }
8031    }
8032}
8033#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8034#[doc = ""]
8035#[doc = "ID: 387"]
8036#[derive(Debug, Clone, PartialEq)]
8037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8039#[cfg_attr(feature = "ts", derive(TS))]
8040#[cfg_attr(feature = "ts", ts(export))]
8041pub struct CANFD_FRAME_DATA {
8042    #[doc = "Frame ID"]
8043    pub id: u32,
8044    #[doc = "System ID."]
8045    pub target_system: u8,
8046    #[doc = "Component ID."]
8047    pub target_component: u8,
8048    #[doc = "bus number"]
8049    pub bus: u8,
8050    #[doc = "Frame length"]
8051    pub len: u8,
8052    #[doc = "Frame data"]
8053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8054    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8055    pub data: [u8; 64],
8056}
8057impl CANFD_FRAME_DATA {
8058    pub const ENCODED_LEN: usize = 72usize;
8059    pub const DEFAULT: Self = Self {
8060        id: 0_u32,
8061        target_system: 0_u8,
8062        target_component: 0_u8,
8063        bus: 0_u8,
8064        len: 0_u8,
8065        data: [0_u8; 64usize],
8066    };
8067    #[cfg(feature = "arbitrary")]
8068    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8069        use arbitrary::{Arbitrary, Unstructured};
8070        let mut buf = [0u8; 1024];
8071        rng.fill_bytes(&mut buf);
8072        let mut unstructured = Unstructured::new(&buf);
8073        Self::arbitrary(&mut unstructured).unwrap_or_default()
8074    }
8075}
8076impl Default for CANFD_FRAME_DATA {
8077    fn default() -> Self {
8078        Self::DEFAULT.clone()
8079    }
8080}
8081impl MessageData for CANFD_FRAME_DATA {
8082    type Message = MavMessage;
8083    const ID: u32 = 387u32;
8084    const NAME: &'static str = "CANFD_FRAME";
8085    const EXTRA_CRC: u8 = 4u8;
8086    const ENCODED_LEN: usize = 72usize;
8087    fn deser(
8088        _version: MavlinkVersion,
8089        __input: &[u8],
8090    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8091        let avail_len = __input.len();
8092        let mut payload_buf = [0; Self::ENCODED_LEN];
8093        let mut buf = if avail_len < Self::ENCODED_LEN {
8094            payload_buf[0..avail_len].copy_from_slice(__input);
8095            Bytes::new(&payload_buf)
8096        } else {
8097            Bytes::new(__input)
8098        };
8099        let mut __struct = Self::default();
8100        __struct.id = buf.get_u32_le();
8101        __struct.target_system = buf.get_u8();
8102        __struct.target_component = buf.get_u8();
8103        __struct.bus = buf.get_u8();
8104        __struct.len = buf.get_u8();
8105        for v in &mut __struct.data {
8106            let val = buf.get_u8();
8107            *v = val;
8108        }
8109        Ok(__struct)
8110    }
8111    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8112        let mut __tmp = BytesMut::new(bytes);
8113        #[allow(clippy::absurd_extreme_comparisons)]
8114        #[allow(unused_comparisons)]
8115        if __tmp.remaining() < Self::ENCODED_LEN {
8116            panic!(
8117                "buffer is too small (need {} bytes, but got {})",
8118                Self::ENCODED_LEN,
8119                __tmp.remaining(),
8120            )
8121        }
8122        __tmp.put_u32_le(self.id);
8123        __tmp.put_u8(self.target_system);
8124        __tmp.put_u8(self.target_component);
8125        __tmp.put_u8(self.bus);
8126        __tmp.put_u8(self.len);
8127        for val in &self.data {
8128            __tmp.put_u8(*val);
8129        }
8130        if matches!(version, MavlinkVersion::V2) {
8131            let len = __tmp.len();
8132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8133        } else {
8134            __tmp.len()
8135        }
8136    }
8137}
8138#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8139#[doc = ""]
8140#[doc = "ID: 388"]
8141#[derive(Debug, Clone, PartialEq)]
8142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8144#[cfg_attr(feature = "ts", derive(TS))]
8145#[cfg_attr(feature = "ts", ts(export))]
8146pub struct CAN_FILTER_MODIFY_DATA {
8147    #[doc = "filter IDs, length num_ids"]
8148    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8149    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8150    pub ids: [u16; 16],
8151    #[doc = "System ID."]
8152    pub target_system: u8,
8153    #[doc = "Component ID."]
8154    pub target_component: u8,
8155    #[doc = "bus number"]
8156    pub bus: u8,
8157    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8158    pub operation: CanFilterOp,
8159    #[doc = "number of IDs in filter list"]
8160    pub num_ids: u8,
8161}
8162impl CAN_FILTER_MODIFY_DATA {
8163    pub const ENCODED_LEN: usize = 37usize;
8164    pub const DEFAULT: Self = Self {
8165        ids: [0_u16; 16usize],
8166        target_system: 0_u8,
8167        target_component: 0_u8,
8168        bus: 0_u8,
8169        operation: CanFilterOp::DEFAULT,
8170        num_ids: 0_u8,
8171    };
8172    #[cfg(feature = "arbitrary")]
8173    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8174        use arbitrary::{Arbitrary, Unstructured};
8175        let mut buf = [0u8; 1024];
8176        rng.fill_bytes(&mut buf);
8177        let mut unstructured = Unstructured::new(&buf);
8178        Self::arbitrary(&mut unstructured).unwrap_or_default()
8179    }
8180}
8181impl Default for CAN_FILTER_MODIFY_DATA {
8182    fn default() -> Self {
8183        Self::DEFAULT.clone()
8184    }
8185}
8186impl MessageData for CAN_FILTER_MODIFY_DATA {
8187    type Message = MavMessage;
8188    const ID: u32 = 388u32;
8189    const NAME: &'static str = "CAN_FILTER_MODIFY";
8190    const EXTRA_CRC: u8 = 8u8;
8191    const ENCODED_LEN: usize = 37usize;
8192    fn deser(
8193        _version: MavlinkVersion,
8194        __input: &[u8],
8195    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8196        let avail_len = __input.len();
8197        let mut payload_buf = [0; Self::ENCODED_LEN];
8198        let mut buf = if avail_len < Self::ENCODED_LEN {
8199            payload_buf[0..avail_len].copy_from_slice(__input);
8200            Bytes::new(&payload_buf)
8201        } else {
8202            Bytes::new(__input)
8203        };
8204        let mut __struct = Self::default();
8205        for v in &mut __struct.ids {
8206            let val = buf.get_u16_le();
8207            *v = val;
8208        }
8209        __struct.target_system = buf.get_u8();
8210        __struct.target_component = buf.get_u8();
8211        __struct.bus = buf.get_u8();
8212        let tmp = buf.get_u8();
8213        __struct.operation =
8214            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8215                enum_type: "CanFilterOp",
8216                value: tmp as u64,
8217            })?;
8218        __struct.num_ids = buf.get_u8();
8219        Ok(__struct)
8220    }
8221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8222        let mut __tmp = BytesMut::new(bytes);
8223        #[allow(clippy::absurd_extreme_comparisons)]
8224        #[allow(unused_comparisons)]
8225        if __tmp.remaining() < Self::ENCODED_LEN {
8226            panic!(
8227                "buffer is too small (need {} bytes, but got {})",
8228                Self::ENCODED_LEN,
8229                __tmp.remaining(),
8230            )
8231        }
8232        for val in &self.ids {
8233            __tmp.put_u16_le(*val);
8234        }
8235        __tmp.put_u8(self.target_system);
8236        __tmp.put_u8(self.target_component);
8237        __tmp.put_u8(self.bus);
8238        __tmp.put_u8(self.operation as u8);
8239        __tmp.put_u8(self.num_ids);
8240        if matches!(version, MavlinkVersion::V2) {
8241            let len = __tmp.len();
8242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8243        } else {
8244            __tmp.len()
8245        }
8246    }
8247}
8248#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8249#[doc = ""]
8250#[doc = "ID: 386"]
8251#[derive(Debug, Clone, PartialEq)]
8252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8254#[cfg_attr(feature = "ts", derive(TS))]
8255#[cfg_attr(feature = "ts", ts(export))]
8256pub struct CAN_FRAME_DATA {
8257    #[doc = "Frame ID"]
8258    pub id: u32,
8259    #[doc = "System ID."]
8260    pub target_system: u8,
8261    #[doc = "Component ID."]
8262    pub target_component: u8,
8263    #[doc = "Bus number"]
8264    pub bus: u8,
8265    #[doc = "Frame length"]
8266    pub len: u8,
8267    #[doc = "Frame data"]
8268    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8269    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8270    pub data: [u8; 8],
8271}
8272impl CAN_FRAME_DATA {
8273    pub const ENCODED_LEN: usize = 16usize;
8274    pub const DEFAULT: Self = Self {
8275        id: 0_u32,
8276        target_system: 0_u8,
8277        target_component: 0_u8,
8278        bus: 0_u8,
8279        len: 0_u8,
8280        data: [0_u8; 8usize],
8281    };
8282    #[cfg(feature = "arbitrary")]
8283    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8284        use arbitrary::{Arbitrary, Unstructured};
8285        let mut buf = [0u8; 1024];
8286        rng.fill_bytes(&mut buf);
8287        let mut unstructured = Unstructured::new(&buf);
8288        Self::arbitrary(&mut unstructured).unwrap_or_default()
8289    }
8290}
8291impl Default for CAN_FRAME_DATA {
8292    fn default() -> Self {
8293        Self::DEFAULT.clone()
8294    }
8295}
8296impl MessageData for CAN_FRAME_DATA {
8297    type Message = MavMessage;
8298    const ID: u32 = 386u32;
8299    const NAME: &'static str = "CAN_FRAME";
8300    const EXTRA_CRC: u8 = 132u8;
8301    const ENCODED_LEN: usize = 16usize;
8302    fn deser(
8303        _version: MavlinkVersion,
8304        __input: &[u8],
8305    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8306        let avail_len = __input.len();
8307        let mut payload_buf = [0; Self::ENCODED_LEN];
8308        let mut buf = if avail_len < Self::ENCODED_LEN {
8309            payload_buf[0..avail_len].copy_from_slice(__input);
8310            Bytes::new(&payload_buf)
8311        } else {
8312            Bytes::new(__input)
8313        };
8314        let mut __struct = Self::default();
8315        __struct.id = buf.get_u32_le();
8316        __struct.target_system = buf.get_u8();
8317        __struct.target_component = buf.get_u8();
8318        __struct.bus = buf.get_u8();
8319        __struct.len = buf.get_u8();
8320        for v in &mut __struct.data {
8321            let val = buf.get_u8();
8322            *v = val;
8323        }
8324        Ok(__struct)
8325    }
8326    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8327        let mut __tmp = BytesMut::new(bytes);
8328        #[allow(clippy::absurd_extreme_comparisons)]
8329        #[allow(unused_comparisons)]
8330        if __tmp.remaining() < Self::ENCODED_LEN {
8331            panic!(
8332                "buffer is too small (need {} bytes, but got {})",
8333                Self::ENCODED_LEN,
8334                __tmp.remaining(),
8335            )
8336        }
8337        __tmp.put_u32_le(self.id);
8338        __tmp.put_u8(self.target_system);
8339        __tmp.put_u8(self.target_component);
8340        __tmp.put_u8(self.bus);
8341        __tmp.put_u8(self.len);
8342        for val in &self.data {
8343            __tmp.put_u8(*val);
8344        }
8345        if matches!(version, MavlinkVersion::V2) {
8346            let len = __tmp.len();
8347            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8348        } else {
8349            __tmp.len()
8350        }
8351    }
8352}
8353#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8354#[doc = ""]
8355#[doc = "ID: 336"]
8356#[derive(Debug, Clone, PartialEq)]
8357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8358#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8359#[cfg_attr(feature = "ts", derive(TS))]
8360#[cfg_attr(feature = "ts", ts(export))]
8361pub struct CELLULAR_CONFIG_DATA {
8362    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8363    pub enable_lte: u8,
8364    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8365    pub enable_pin: u8,
8366    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8367    #[cfg_attr(feature = "ts", ts(type = "string"))]
8368    pub pin: CharArray<16>,
8369    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8370    #[cfg_attr(feature = "ts", ts(type = "string"))]
8371    pub new_pin: CharArray<16>,
8372    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8373    #[cfg_attr(feature = "ts", ts(type = "string"))]
8374    pub apn: CharArray<32>,
8375    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8376    #[cfg_attr(feature = "ts", ts(type = "string"))]
8377    pub puk: CharArray<16>,
8378    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8379    pub roaming: u8,
8380    #[doc = "Message acceptance response (sent back to GS)."]
8381    pub response: CellularConfigResponse,
8382}
8383impl CELLULAR_CONFIG_DATA {
8384    pub const ENCODED_LEN: usize = 84usize;
8385    pub const DEFAULT: Self = Self {
8386        enable_lte: 0_u8,
8387        enable_pin: 0_u8,
8388        pin: CharArray::new([0_u8; 16usize]),
8389        new_pin: CharArray::new([0_u8; 16usize]),
8390        apn: CharArray::new([0_u8; 32usize]),
8391        puk: CharArray::new([0_u8; 16usize]),
8392        roaming: 0_u8,
8393        response: CellularConfigResponse::DEFAULT,
8394    };
8395    #[cfg(feature = "arbitrary")]
8396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8397        use arbitrary::{Arbitrary, Unstructured};
8398        let mut buf = [0u8; 1024];
8399        rng.fill_bytes(&mut buf);
8400        let mut unstructured = Unstructured::new(&buf);
8401        Self::arbitrary(&mut unstructured).unwrap_or_default()
8402    }
8403}
8404impl Default for CELLULAR_CONFIG_DATA {
8405    fn default() -> Self {
8406        Self::DEFAULT.clone()
8407    }
8408}
8409impl MessageData for CELLULAR_CONFIG_DATA {
8410    type Message = MavMessage;
8411    const ID: u32 = 336u32;
8412    const NAME: &'static str = "CELLULAR_CONFIG";
8413    const EXTRA_CRC: u8 = 245u8;
8414    const ENCODED_LEN: usize = 84usize;
8415    fn deser(
8416        _version: MavlinkVersion,
8417        __input: &[u8],
8418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8419        let avail_len = __input.len();
8420        let mut payload_buf = [0; Self::ENCODED_LEN];
8421        let mut buf = if avail_len < Self::ENCODED_LEN {
8422            payload_buf[0..avail_len].copy_from_slice(__input);
8423            Bytes::new(&payload_buf)
8424        } else {
8425            Bytes::new(__input)
8426        };
8427        let mut __struct = Self::default();
8428        __struct.enable_lte = buf.get_u8();
8429        __struct.enable_pin = buf.get_u8();
8430        let mut tmp = [0_u8; 16usize];
8431        for v in &mut tmp {
8432            *v = buf.get_u8();
8433        }
8434        __struct.pin = CharArray::new(tmp);
8435        let mut tmp = [0_u8; 16usize];
8436        for v in &mut tmp {
8437            *v = buf.get_u8();
8438        }
8439        __struct.new_pin = CharArray::new(tmp);
8440        let mut tmp = [0_u8; 32usize];
8441        for v in &mut tmp {
8442            *v = buf.get_u8();
8443        }
8444        __struct.apn = CharArray::new(tmp);
8445        let mut tmp = [0_u8; 16usize];
8446        for v in &mut tmp {
8447            *v = buf.get_u8();
8448        }
8449        __struct.puk = CharArray::new(tmp);
8450        __struct.roaming = buf.get_u8();
8451        let tmp = buf.get_u8();
8452        __struct.response =
8453            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8454                enum_type: "CellularConfigResponse",
8455                value: tmp as u64,
8456            })?;
8457        Ok(__struct)
8458    }
8459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8460        let mut __tmp = BytesMut::new(bytes);
8461        #[allow(clippy::absurd_extreme_comparisons)]
8462        #[allow(unused_comparisons)]
8463        if __tmp.remaining() < Self::ENCODED_LEN {
8464            panic!(
8465                "buffer is too small (need {} bytes, but got {})",
8466                Self::ENCODED_LEN,
8467                __tmp.remaining(),
8468            )
8469        }
8470        __tmp.put_u8(self.enable_lte);
8471        __tmp.put_u8(self.enable_pin);
8472        for val in &self.pin {
8473            __tmp.put_u8(*val);
8474        }
8475        for val in &self.new_pin {
8476            __tmp.put_u8(*val);
8477        }
8478        for val in &self.apn {
8479            __tmp.put_u8(*val);
8480        }
8481        for val in &self.puk {
8482            __tmp.put_u8(*val);
8483        }
8484        __tmp.put_u8(self.roaming);
8485        __tmp.put_u8(self.response as u8);
8486        if matches!(version, MavlinkVersion::V2) {
8487            let len = __tmp.len();
8488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8489        } else {
8490            __tmp.len()
8491        }
8492    }
8493}
8494#[doc = "Report current used cellular network status."]
8495#[doc = ""]
8496#[doc = "ID: 334"]
8497#[derive(Debug, Clone, PartialEq)]
8498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8500#[cfg_attr(feature = "ts", derive(TS))]
8501#[cfg_attr(feature = "ts", ts(export))]
8502pub struct CELLULAR_STATUS_DATA {
8503    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8504    pub mcc: u16,
8505    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8506    pub mnc: u16,
8507    #[doc = "Location area code. If unknown, set to 0"]
8508    pub lac: u16,
8509    #[doc = "Cellular modem status"]
8510    pub status: CellularStatusFlag,
8511    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8512    pub failure_reason: CellularNetworkFailedReason,
8513    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8514    pub mavtype: CellularNetworkRadioType,
8515    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8516    pub quality: u8,
8517}
8518impl CELLULAR_STATUS_DATA {
8519    pub const ENCODED_LEN: usize = 10usize;
8520    pub const DEFAULT: Self = Self {
8521        mcc: 0_u16,
8522        mnc: 0_u16,
8523        lac: 0_u16,
8524        status: CellularStatusFlag::DEFAULT,
8525        failure_reason: CellularNetworkFailedReason::DEFAULT,
8526        mavtype: CellularNetworkRadioType::DEFAULT,
8527        quality: 0_u8,
8528    };
8529    #[cfg(feature = "arbitrary")]
8530    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8531        use arbitrary::{Arbitrary, Unstructured};
8532        let mut buf = [0u8; 1024];
8533        rng.fill_bytes(&mut buf);
8534        let mut unstructured = Unstructured::new(&buf);
8535        Self::arbitrary(&mut unstructured).unwrap_or_default()
8536    }
8537}
8538impl Default for CELLULAR_STATUS_DATA {
8539    fn default() -> Self {
8540        Self::DEFAULT.clone()
8541    }
8542}
8543impl MessageData for CELLULAR_STATUS_DATA {
8544    type Message = MavMessage;
8545    const ID: u32 = 334u32;
8546    const NAME: &'static str = "CELLULAR_STATUS";
8547    const EXTRA_CRC: u8 = 72u8;
8548    const ENCODED_LEN: usize = 10usize;
8549    fn deser(
8550        _version: MavlinkVersion,
8551        __input: &[u8],
8552    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8553        let avail_len = __input.len();
8554        let mut payload_buf = [0; Self::ENCODED_LEN];
8555        let mut buf = if avail_len < Self::ENCODED_LEN {
8556            payload_buf[0..avail_len].copy_from_slice(__input);
8557            Bytes::new(&payload_buf)
8558        } else {
8559            Bytes::new(__input)
8560        };
8561        let mut __struct = Self::default();
8562        __struct.mcc = buf.get_u16_le();
8563        __struct.mnc = buf.get_u16_le();
8564        __struct.lac = buf.get_u16_le();
8565        let tmp = buf.get_u8();
8566        __struct.status =
8567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8568                enum_type: "CellularStatusFlag",
8569                value: tmp as u64,
8570            })?;
8571        let tmp = buf.get_u8();
8572        __struct.failure_reason =
8573            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8574                enum_type: "CellularNetworkFailedReason",
8575                value: tmp as u64,
8576            })?;
8577        let tmp = buf.get_u8();
8578        __struct.mavtype =
8579            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8580                enum_type: "CellularNetworkRadioType",
8581                value: tmp as u64,
8582            })?;
8583        __struct.quality = buf.get_u8();
8584        Ok(__struct)
8585    }
8586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8587        let mut __tmp = BytesMut::new(bytes);
8588        #[allow(clippy::absurd_extreme_comparisons)]
8589        #[allow(unused_comparisons)]
8590        if __tmp.remaining() < Self::ENCODED_LEN {
8591            panic!(
8592                "buffer is too small (need {} bytes, but got {})",
8593                Self::ENCODED_LEN,
8594                __tmp.remaining(),
8595            )
8596        }
8597        __tmp.put_u16_le(self.mcc);
8598        __tmp.put_u16_le(self.mnc);
8599        __tmp.put_u16_le(self.lac);
8600        __tmp.put_u8(self.status as u8);
8601        __tmp.put_u8(self.failure_reason as u8);
8602        __tmp.put_u8(self.mavtype as u8);
8603        __tmp.put_u8(self.quality);
8604        if matches!(version, MavlinkVersion::V2) {
8605            let len = __tmp.len();
8606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8607        } else {
8608            __tmp.len()
8609        }
8610    }
8611}
8612#[doc = "Request to control this MAV."]
8613#[doc = ""]
8614#[doc = "ID: 5"]
8615#[derive(Debug, Clone, PartialEq)]
8616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8618#[cfg_attr(feature = "ts", derive(TS))]
8619#[cfg_attr(feature = "ts", ts(export))]
8620pub struct CHANGE_OPERATOR_CONTROL_DATA {
8621    #[doc = "System the GCS requests control for"]
8622    pub target_system: u8,
8623    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8624    pub control_request: u8,
8625    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8626    pub version: u8,
8627    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8628    #[cfg_attr(feature = "ts", ts(type = "string"))]
8629    pub passkey: CharArray<25>,
8630}
8631impl CHANGE_OPERATOR_CONTROL_DATA {
8632    pub const ENCODED_LEN: usize = 28usize;
8633    pub const DEFAULT: Self = Self {
8634        target_system: 0_u8,
8635        control_request: 0_u8,
8636        version: 0_u8,
8637        passkey: CharArray::new([0_u8; 25usize]),
8638    };
8639    #[cfg(feature = "arbitrary")]
8640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8641        use arbitrary::{Arbitrary, Unstructured};
8642        let mut buf = [0u8; 1024];
8643        rng.fill_bytes(&mut buf);
8644        let mut unstructured = Unstructured::new(&buf);
8645        Self::arbitrary(&mut unstructured).unwrap_or_default()
8646    }
8647}
8648impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8649    fn default() -> Self {
8650        Self::DEFAULT.clone()
8651    }
8652}
8653impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8654    type Message = MavMessage;
8655    const ID: u32 = 5u32;
8656    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8657    const EXTRA_CRC: u8 = 217u8;
8658    const ENCODED_LEN: usize = 28usize;
8659    fn deser(
8660        _version: MavlinkVersion,
8661        __input: &[u8],
8662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8663        let avail_len = __input.len();
8664        let mut payload_buf = [0; Self::ENCODED_LEN];
8665        let mut buf = if avail_len < Self::ENCODED_LEN {
8666            payload_buf[0..avail_len].copy_from_slice(__input);
8667            Bytes::new(&payload_buf)
8668        } else {
8669            Bytes::new(__input)
8670        };
8671        let mut __struct = Self::default();
8672        __struct.target_system = buf.get_u8();
8673        __struct.control_request = buf.get_u8();
8674        __struct.version = buf.get_u8();
8675        let mut tmp = [0_u8; 25usize];
8676        for v in &mut tmp {
8677            *v = buf.get_u8();
8678        }
8679        __struct.passkey = CharArray::new(tmp);
8680        Ok(__struct)
8681    }
8682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8683        let mut __tmp = BytesMut::new(bytes);
8684        #[allow(clippy::absurd_extreme_comparisons)]
8685        #[allow(unused_comparisons)]
8686        if __tmp.remaining() < Self::ENCODED_LEN {
8687            panic!(
8688                "buffer is too small (need {} bytes, but got {})",
8689                Self::ENCODED_LEN,
8690                __tmp.remaining(),
8691            )
8692        }
8693        __tmp.put_u8(self.target_system);
8694        __tmp.put_u8(self.control_request);
8695        __tmp.put_u8(self.version);
8696        for val in &self.passkey {
8697            __tmp.put_u8(*val);
8698        }
8699        if matches!(version, MavlinkVersion::V2) {
8700            let len = __tmp.len();
8701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8702        } else {
8703            __tmp.len()
8704        }
8705    }
8706}
8707#[doc = "Accept / deny control of this MAV."]
8708#[doc = ""]
8709#[doc = "ID: 6"]
8710#[derive(Debug, Clone, PartialEq)]
8711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8713#[cfg_attr(feature = "ts", derive(TS))]
8714#[cfg_attr(feature = "ts", ts(export))]
8715pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8716    #[doc = "ID of the GCS this message"]
8717    pub gcs_system_id: u8,
8718    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8719    pub control_request: u8,
8720    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8721    pub ack: u8,
8722}
8723impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8724    pub const ENCODED_LEN: usize = 3usize;
8725    pub const DEFAULT: Self = Self {
8726        gcs_system_id: 0_u8,
8727        control_request: 0_u8,
8728        ack: 0_u8,
8729    };
8730    #[cfg(feature = "arbitrary")]
8731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8732        use arbitrary::{Arbitrary, Unstructured};
8733        let mut buf = [0u8; 1024];
8734        rng.fill_bytes(&mut buf);
8735        let mut unstructured = Unstructured::new(&buf);
8736        Self::arbitrary(&mut unstructured).unwrap_or_default()
8737    }
8738}
8739impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8740    fn default() -> Self {
8741        Self::DEFAULT.clone()
8742    }
8743}
8744impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8745    type Message = MavMessage;
8746    const ID: u32 = 6u32;
8747    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8748    const EXTRA_CRC: u8 = 104u8;
8749    const ENCODED_LEN: usize = 3usize;
8750    fn deser(
8751        _version: MavlinkVersion,
8752        __input: &[u8],
8753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8754        let avail_len = __input.len();
8755        let mut payload_buf = [0; Self::ENCODED_LEN];
8756        let mut buf = if avail_len < Self::ENCODED_LEN {
8757            payload_buf[0..avail_len].copy_from_slice(__input);
8758            Bytes::new(&payload_buf)
8759        } else {
8760            Bytes::new(__input)
8761        };
8762        let mut __struct = Self::default();
8763        __struct.gcs_system_id = buf.get_u8();
8764        __struct.control_request = buf.get_u8();
8765        __struct.ack = buf.get_u8();
8766        Ok(__struct)
8767    }
8768    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8769        let mut __tmp = BytesMut::new(bytes);
8770        #[allow(clippy::absurd_extreme_comparisons)]
8771        #[allow(unused_comparisons)]
8772        if __tmp.remaining() < Self::ENCODED_LEN {
8773            panic!(
8774                "buffer is too small (need {} bytes, but got {})",
8775                Self::ENCODED_LEN,
8776                __tmp.remaining(),
8777            )
8778        }
8779        __tmp.put_u8(self.gcs_system_id);
8780        __tmp.put_u8(self.control_request);
8781        __tmp.put_u8(self.ack);
8782        if matches!(version, MavlinkVersion::V2) {
8783            let len = __tmp.len();
8784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8785        } else {
8786            __tmp.len()
8787        }
8788    }
8789}
8790#[doc = "Information about a potential collision."]
8791#[doc = ""]
8792#[doc = "ID: 247"]
8793#[derive(Debug, Clone, PartialEq)]
8794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8795#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8796#[cfg_attr(feature = "ts", derive(TS))]
8797#[cfg_attr(feature = "ts", ts(export))]
8798pub struct COLLISION_DATA {
8799    #[doc = "Unique identifier, domain based on src field"]
8800    pub id: u32,
8801    #[doc = "Estimated time until collision occurs"]
8802    pub time_to_minimum_delta: f32,
8803    #[doc = "Closest vertical distance between vehicle and object"]
8804    pub altitude_minimum_delta: f32,
8805    #[doc = "Closest horizontal distance between vehicle and object"]
8806    pub horizontal_minimum_delta: f32,
8807    #[doc = "Collision data source"]
8808    pub src: MavCollisionSrc,
8809    #[doc = "Action that is being taken to avoid this collision"]
8810    pub action: MavCollisionAction,
8811    #[doc = "How concerned the aircraft is about this collision"]
8812    pub threat_level: MavCollisionThreatLevel,
8813}
8814impl COLLISION_DATA {
8815    pub const ENCODED_LEN: usize = 19usize;
8816    pub const DEFAULT: Self = Self {
8817        id: 0_u32,
8818        time_to_minimum_delta: 0.0_f32,
8819        altitude_minimum_delta: 0.0_f32,
8820        horizontal_minimum_delta: 0.0_f32,
8821        src: MavCollisionSrc::DEFAULT,
8822        action: MavCollisionAction::DEFAULT,
8823        threat_level: MavCollisionThreatLevel::DEFAULT,
8824    };
8825    #[cfg(feature = "arbitrary")]
8826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8827        use arbitrary::{Arbitrary, Unstructured};
8828        let mut buf = [0u8; 1024];
8829        rng.fill_bytes(&mut buf);
8830        let mut unstructured = Unstructured::new(&buf);
8831        Self::arbitrary(&mut unstructured).unwrap_or_default()
8832    }
8833}
8834impl Default for COLLISION_DATA {
8835    fn default() -> Self {
8836        Self::DEFAULT.clone()
8837    }
8838}
8839impl MessageData for COLLISION_DATA {
8840    type Message = MavMessage;
8841    const ID: u32 = 247u32;
8842    const NAME: &'static str = "COLLISION";
8843    const EXTRA_CRC: u8 = 81u8;
8844    const ENCODED_LEN: usize = 19usize;
8845    fn deser(
8846        _version: MavlinkVersion,
8847        __input: &[u8],
8848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8849        let avail_len = __input.len();
8850        let mut payload_buf = [0; Self::ENCODED_LEN];
8851        let mut buf = if avail_len < Self::ENCODED_LEN {
8852            payload_buf[0..avail_len].copy_from_slice(__input);
8853            Bytes::new(&payload_buf)
8854        } else {
8855            Bytes::new(__input)
8856        };
8857        let mut __struct = Self::default();
8858        __struct.id = buf.get_u32_le();
8859        __struct.time_to_minimum_delta = buf.get_f32_le();
8860        __struct.altitude_minimum_delta = buf.get_f32_le();
8861        __struct.horizontal_minimum_delta = buf.get_f32_le();
8862        let tmp = buf.get_u8();
8863        __struct.src =
8864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8865                enum_type: "MavCollisionSrc",
8866                value: tmp as u64,
8867            })?;
8868        let tmp = buf.get_u8();
8869        __struct.action =
8870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8871                enum_type: "MavCollisionAction",
8872                value: tmp as u64,
8873            })?;
8874        let tmp = buf.get_u8();
8875        __struct.threat_level =
8876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8877                enum_type: "MavCollisionThreatLevel",
8878                value: tmp as u64,
8879            })?;
8880        Ok(__struct)
8881    }
8882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8883        let mut __tmp = BytesMut::new(bytes);
8884        #[allow(clippy::absurd_extreme_comparisons)]
8885        #[allow(unused_comparisons)]
8886        if __tmp.remaining() < Self::ENCODED_LEN {
8887            panic!(
8888                "buffer is too small (need {} bytes, but got {})",
8889                Self::ENCODED_LEN,
8890                __tmp.remaining(),
8891            )
8892        }
8893        __tmp.put_u32_le(self.id);
8894        __tmp.put_f32_le(self.time_to_minimum_delta);
8895        __tmp.put_f32_le(self.altitude_minimum_delta);
8896        __tmp.put_f32_le(self.horizontal_minimum_delta);
8897        __tmp.put_u8(self.src as u8);
8898        __tmp.put_u8(self.action as u8);
8899        __tmp.put_u8(self.threat_level as u8);
8900        if matches!(version, MavlinkVersion::V2) {
8901            let len = __tmp.len();
8902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8903        } else {
8904            __tmp.len()
8905        }
8906    }
8907}
8908#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8909#[doc = ""]
8910#[doc = "ID: 77"]
8911#[derive(Debug, Clone, PartialEq)]
8912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8913#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8914#[cfg_attr(feature = "ts", derive(TS))]
8915#[cfg_attr(feature = "ts", ts(export))]
8916pub struct COMMAND_ACK_DATA {
8917    #[doc = "Command ID (of acknowledged command)."]
8918    pub command: MavCmd,
8919    #[doc = "Result of command."]
8920    pub result: MavResult,
8921    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8922    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8923    pub progress: u8,
8924    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8925    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8926    pub result_param2: i32,
8927    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8928    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8929    pub target_system: u8,
8930    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8931    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8932    pub target_component: u8,
8933}
8934impl COMMAND_ACK_DATA {
8935    pub const ENCODED_LEN: usize = 10usize;
8936    pub const DEFAULT: Self = Self {
8937        command: MavCmd::DEFAULT,
8938        result: MavResult::DEFAULT,
8939        progress: 0_u8,
8940        result_param2: 0_i32,
8941        target_system: 0_u8,
8942        target_component: 0_u8,
8943    };
8944    #[cfg(feature = "arbitrary")]
8945    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8946        use arbitrary::{Arbitrary, Unstructured};
8947        let mut buf = [0u8; 1024];
8948        rng.fill_bytes(&mut buf);
8949        let mut unstructured = Unstructured::new(&buf);
8950        Self::arbitrary(&mut unstructured).unwrap_or_default()
8951    }
8952}
8953impl Default for COMMAND_ACK_DATA {
8954    fn default() -> Self {
8955        Self::DEFAULT.clone()
8956    }
8957}
8958impl MessageData for COMMAND_ACK_DATA {
8959    type Message = MavMessage;
8960    const ID: u32 = 77u32;
8961    const NAME: &'static str = "COMMAND_ACK";
8962    const EXTRA_CRC: u8 = 143u8;
8963    const ENCODED_LEN: usize = 10usize;
8964    fn deser(
8965        _version: MavlinkVersion,
8966        __input: &[u8],
8967    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8968        let avail_len = __input.len();
8969        let mut payload_buf = [0; Self::ENCODED_LEN];
8970        let mut buf = if avail_len < Self::ENCODED_LEN {
8971            payload_buf[0..avail_len].copy_from_slice(__input);
8972            Bytes::new(&payload_buf)
8973        } else {
8974            Bytes::new(__input)
8975        };
8976        let mut __struct = Self::default();
8977        let tmp = buf.get_u16_le();
8978        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8979            ::mavlink_core::error::ParserError::InvalidEnum {
8980                enum_type: "MavCmd",
8981                value: tmp as u64,
8982            },
8983        )?;
8984        let tmp = buf.get_u8();
8985        __struct.result =
8986            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8987                enum_type: "MavResult",
8988                value: tmp as u64,
8989            })?;
8990        __struct.progress = buf.get_u8();
8991        __struct.result_param2 = buf.get_i32_le();
8992        __struct.target_system = buf.get_u8();
8993        __struct.target_component = buf.get_u8();
8994        Ok(__struct)
8995    }
8996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8997        let mut __tmp = BytesMut::new(bytes);
8998        #[allow(clippy::absurd_extreme_comparisons)]
8999        #[allow(unused_comparisons)]
9000        if __tmp.remaining() < Self::ENCODED_LEN {
9001            panic!(
9002                "buffer is too small (need {} bytes, but got {})",
9003                Self::ENCODED_LEN,
9004                __tmp.remaining(),
9005            )
9006        }
9007        __tmp.put_u16_le(self.command as u16);
9008        __tmp.put_u8(self.result as u8);
9009        if matches!(version, MavlinkVersion::V2) {
9010            __tmp.put_u8(self.progress);
9011            __tmp.put_i32_le(self.result_param2);
9012            __tmp.put_u8(self.target_system);
9013            __tmp.put_u8(self.target_component);
9014            let len = __tmp.len();
9015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9016        } else {
9017            __tmp.len()
9018        }
9019    }
9020}
9021#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9022#[doc = ""]
9023#[doc = "ID: 80"]
9024#[derive(Debug, Clone, PartialEq)]
9025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9027#[cfg_attr(feature = "ts", derive(TS))]
9028#[cfg_attr(feature = "ts", ts(export))]
9029pub struct COMMAND_CANCEL_DATA {
9030    #[doc = "Command ID (of command to cancel)."]
9031    pub command: MavCmd,
9032    #[doc = "System executing long running command. Should not be broadcast (0)."]
9033    pub target_system: u8,
9034    #[doc = "Component executing long running command."]
9035    pub target_component: u8,
9036}
9037impl COMMAND_CANCEL_DATA {
9038    pub const ENCODED_LEN: usize = 4usize;
9039    pub const DEFAULT: Self = Self {
9040        command: MavCmd::DEFAULT,
9041        target_system: 0_u8,
9042        target_component: 0_u8,
9043    };
9044    #[cfg(feature = "arbitrary")]
9045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9046        use arbitrary::{Arbitrary, Unstructured};
9047        let mut buf = [0u8; 1024];
9048        rng.fill_bytes(&mut buf);
9049        let mut unstructured = Unstructured::new(&buf);
9050        Self::arbitrary(&mut unstructured).unwrap_or_default()
9051    }
9052}
9053impl Default for COMMAND_CANCEL_DATA {
9054    fn default() -> Self {
9055        Self::DEFAULT.clone()
9056    }
9057}
9058impl MessageData for COMMAND_CANCEL_DATA {
9059    type Message = MavMessage;
9060    const ID: u32 = 80u32;
9061    const NAME: &'static str = "COMMAND_CANCEL";
9062    const EXTRA_CRC: u8 = 14u8;
9063    const ENCODED_LEN: usize = 4usize;
9064    fn deser(
9065        _version: MavlinkVersion,
9066        __input: &[u8],
9067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9068        let avail_len = __input.len();
9069        let mut payload_buf = [0; Self::ENCODED_LEN];
9070        let mut buf = if avail_len < Self::ENCODED_LEN {
9071            payload_buf[0..avail_len].copy_from_slice(__input);
9072            Bytes::new(&payload_buf)
9073        } else {
9074            Bytes::new(__input)
9075        };
9076        let mut __struct = Self::default();
9077        let tmp = buf.get_u16_le();
9078        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9079            ::mavlink_core::error::ParserError::InvalidEnum {
9080                enum_type: "MavCmd",
9081                value: tmp as u64,
9082            },
9083        )?;
9084        __struct.target_system = buf.get_u8();
9085        __struct.target_component = buf.get_u8();
9086        Ok(__struct)
9087    }
9088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9089        let mut __tmp = BytesMut::new(bytes);
9090        #[allow(clippy::absurd_extreme_comparisons)]
9091        #[allow(unused_comparisons)]
9092        if __tmp.remaining() < Self::ENCODED_LEN {
9093            panic!(
9094                "buffer is too small (need {} bytes, but got {})",
9095                Self::ENCODED_LEN,
9096                __tmp.remaining(),
9097            )
9098        }
9099        __tmp.put_u16_le(self.command as u16);
9100        __tmp.put_u8(self.target_system);
9101        __tmp.put_u8(self.target_component);
9102        if matches!(version, MavlinkVersion::V2) {
9103            let len = __tmp.len();
9104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9105        } else {
9106            __tmp.len()
9107        }
9108    }
9109}
9110#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9111#[doc = ""]
9112#[doc = "ID: 75"]
9113#[derive(Debug, Clone, PartialEq)]
9114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9115#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9116#[cfg_attr(feature = "ts", derive(TS))]
9117#[cfg_attr(feature = "ts", ts(export))]
9118pub struct COMMAND_INT_DATA {
9119    #[doc = "PARAM1, see MAV_CMD enum"]
9120    pub param1: f32,
9121    #[doc = "PARAM2, see MAV_CMD enum"]
9122    pub param2: f32,
9123    #[doc = "PARAM3, see MAV_CMD enum"]
9124    pub param3: f32,
9125    #[doc = "PARAM4, see MAV_CMD enum"]
9126    pub param4: f32,
9127    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9128    pub x: i32,
9129    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9130    pub y: i32,
9131    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9132    pub z: f32,
9133    #[doc = "The scheduled action for the mission item."]
9134    pub command: MavCmd,
9135    #[doc = "System ID"]
9136    pub target_system: u8,
9137    #[doc = "Component ID"]
9138    pub target_component: u8,
9139    #[doc = "The coordinate system of the COMMAND."]
9140    pub frame: MavFrame,
9141    #[doc = "Not used."]
9142    pub current: u8,
9143    #[doc = "Not used (set 0)."]
9144    pub autocontinue: u8,
9145}
9146impl COMMAND_INT_DATA {
9147    pub const ENCODED_LEN: usize = 35usize;
9148    pub const DEFAULT: Self = Self {
9149        param1: 0.0_f32,
9150        param2: 0.0_f32,
9151        param3: 0.0_f32,
9152        param4: 0.0_f32,
9153        x: 0_i32,
9154        y: 0_i32,
9155        z: 0.0_f32,
9156        command: MavCmd::DEFAULT,
9157        target_system: 0_u8,
9158        target_component: 0_u8,
9159        frame: MavFrame::DEFAULT,
9160        current: 0_u8,
9161        autocontinue: 0_u8,
9162    };
9163    #[cfg(feature = "arbitrary")]
9164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9165        use arbitrary::{Arbitrary, Unstructured};
9166        let mut buf = [0u8; 1024];
9167        rng.fill_bytes(&mut buf);
9168        let mut unstructured = Unstructured::new(&buf);
9169        Self::arbitrary(&mut unstructured).unwrap_or_default()
9170    }
9171}
9172impl Default for COMMAND_INT_DATA {
9173    fn default() -> Self {
9174        Self::DEFAULT.clone()
9175    }
9176}
9177impl MessageData for COMMAND_INT_DATA {
9178    type Message = MavMessage;
9179    const ID: u32 = 75u32;
9180    const NAME: &'static str = "COMMAND_INT";
9181    const EXTRA_CRC: u8 = 158u8;
9182    const ENCODED_LEN: usize = 35usize;
9183    fn deser(
9184        _version: MavlinkVersion,
9185        __input: &[u8],
9186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9187        let avail_len = __input.len();
9188        let mut payload_buf = [0; Self::ENCODED_LEN];
9189        let mut buf = if avail_len < Self::ENCODED_LEN {
9190            payload_buf[0..avail_len].copy_from_slice(__input);
9191            Bytes::new(&payload_buf)
9192        } else {
9193            Bytes::new(__input)
9194        };
9195        let mut __struct = Self::default();
9196        __struct.param1 = buf.get_f32_le();
9197        __struct.param2 = buf.get_f32_le();
9198        __struct.param3 = buf.get_f32_le();
9199        __struct.param4 = buf.get_f32_le();
9200        __struct.x = buf.get_i32_le();
9201        __struct.y = buf.get_i32_le();
9202        __struct.z = buf.get_f32_le();
9203        let tmp = buf.get_u16_le();
9204        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9205            ::mavlink_core::error::ParserError::InvalidEnum {
9206                enum_type: "MavCmd",
9207                value: tmp as u64,
9208            },
9209        )?;
9210        __struct.target_system = buf.get_u8();
9211        __struct.target_component = buf.get_u8();
9212        let tmp = buf.get_u8();
9213        __struct.frame =
9214            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9215                enum_type: "MavFrame",
9216                value: tmp as u64,
9217            })?;
9218        __struct.current = buf.get_u8();
9219        __struct.autocontinue = buf.get_u8();
9220        Ok(__struct)
9221    }
9222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9223        let mut __tmp = BytesMut::new(bytes);
9224        #[allow(clippy::absurd_extreme_comparisons)]
9225        #[allow(unused_comparisons)]
9226        if __tmp.remaining() < Self::ENCODED_LEN {
9227            panic!(
9228                "buffer is too small (need {} bytes, but got {})",
9229                Self::ENCODED_LEN,
9230                __tmp.remaining(),
9231            )
9232        }
9233        __tmp.put_f32_le(self.param1);
9234        __tmp.put_f32_le(self.param2);
9235        __tmp.put_f32_le(self.param3);
9236        __tmp.put_f32_le(self.param4);
9237        __tmp.put_i32_le(self.x);
9238        __tmp.put_i32_le(self.y);
9239        __tmp.put_f32_le(self.z);
9240        __tmp.put_u16_le(self.command as u16);
9241        __tmp.put_u8(self.target_system);
9242        __tmp.put_u8(self.target_component);
9243        __tmp.put_u8(self.frame as u8);
9244        __tmp.put_u8(self.current);
9245        __tmp.put_u8(self.autocontinue);
9246        if matches!(version, MavlinkVersion::V2) {
9247            let len = __tmp.len();
9248            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9249        } else {
9250            __tmp.len()
9251        }
9252    }
9253}
9254#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9255#[doc = ""]
9256#[doc = "ID: 76"]
9257#[derive(Debug, Clone, PartialEq)]
9258#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9259#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9260#[cfg_attr(feature = "ts", derive(TS))]
9261#[cfg_attr(feature = "ts", ts(export))]
9262pub struct COMMAND_LONG_DATA {
9263    #[doc = "Parameter 1 (for the specific command)."]
9264    pub param1: f32,
9265    #[doc = "Parameter 2 (for the specific command)."]
9266    pub param2: f32,
9267    #[doc = "Parameter 3 (for the specific command)."]
9268    pub param3: f32,
9269    #[doc = "Parameter 4 (for the specific command)."]
9270    pub param4: f32,
9271    #[doc = "Parameter 5 (for the specific command)."]
9272    pub param5: f32,
9273    #[doc = "Parameter 6 (for the specific command)."]
9274    pub param6: f32,
9275    #[doc = "Parameter 7 (for the specific command)."]
9276    pub param7: f32,
9277    #[doc = "Command ID (of command to send)."]
9278    pub command: MavCmd,
9279    #[doc = "System which should execute the command"]
9280    pub target_system: u8,
9281    #[doc = "Component which should execute the command, 0 for all components"]
9282    pub target_component: u8,
9283    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9284    pub confirmation: u8,
9285}
9286impl COMMAND_LONG_DATA {
9287    pub const ENCODED_LEN: usize = 33usize;
9288    pub const DEFAULT: Self = Self {
9289        param1: 0.0_f32,
9290        param2: 0.0_f32,
9291        param3: 0.0_f32,
9292        param4: 0.0_f32,
9293        param5: 0.0_f32,
9294        param6: 0.0_f32,
9295        param7: 0.0_f32,
9296        command: MavCmd::DEFAULT,
9297        target_system: 0_u8,
9298        target_component: 0_u8,
9299        confirmation: 0_u8,
9300    };
9301    #[cfg(feature = "arbitrary")]
9302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9303        use arbitrary::{Arbitrary, Unstructured};
9304        let mut buf = [0u8; 1024];
9305        rng.fill_bytes(&mut buf);
9306        let mut unstructured = Unstructured::new(&buf);
9307        Self::arbitrary(&mut unstructured).unwrap_or_default()
9308    }
9309}
9310impl Default for COMMAND_LONG_DATA {
9311    fn default() -> Self {
9312        Self::DEFAULT.clone()
9313    }
9314}
9315impl MessageData for COMMAND_LONG_DATA {
9316    type Message = MavMessage;
9317    const ID: u32 = 76u32;
9318    const NAME: &'static str = "COMMAND_LONG";
9319    const EXTRA_CRC: u8 = 152u8;
9320    const ENCODED_LEN: usize = 33usize;
9321    fn deser(
9322        _version: MavlinkVersion,
9323        __input: &[u8],
9324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9325        let avail_len = __input.len();
9326        let mut payload_buf = [0; Self::ENCODED_LEN];
9327        let mut buf = if avail_len < Self::ENCODED_LEN {
9328            payload_buf[0..avail_len].copy_from_slice(__input);
9329            Bytes::new(&payload_buf)
9330        } else {
9331            Bytes::new(__input)
9332        };
9333        let mut __struct = Self::default();
9334        __struct.param1 = buf.get_f32_le();
9335        __struct.param2 = buf.get_f32_le();
9336        __struct.param3 = buf.get_f32_le();
9337        __struct.param4 = buf.get_f32_le();
9338        __struct.param5 = buf.get_f32_le();
9339        __struct.param6 = buf.get_f32_le();
9340        __struct.param7 = buf.get_f32_le();
9341        let tmp = buf.get_u16_le();
9342        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9343            ::mavlink_core::error::ParserError::InvalidEnum {
9344                enum_type: "MavCmd",
9345                value: tmp as u64,
9346            },
9347        )?;
9348        __struct.target_system = buf.get_u8();
9349        __struct.target_component = buf.get_u8();
9350        __struct.confirmation = buf.get_u8();
9351        Ok(__struct)
9352    }
9353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9354        let mut __tmp = BytesMut::new(bytes);
9355        #[allow(clippy::absurd_extreme_comparisons)]
9356        #[allow(unused_comparisons)]
9357        if __tmp.remaining() < Self::ENCODED_LEN {
9358            panic!(
9359                "buffer is too small (need {} bytes, but got {})",
9360                Self::ENCODED_LEN,
9361                __tmp.remaining(),
9362            )
9363        }
9364        __tmp.put_f32_le(self.param1);
9365        __tmp.put_f32_le(self.param2);
9366        __tmp.put_f32_le(self.param3);
9367        __tmp.put_f32_le(self.param4);
9368        __tmp.put_f32_le(self.param5);
9369        __tmp.put_f32_le(self.param6);
9370        __tmp.put_f32_le(self.param7);
9371        __tmp.put_u16_le(self.command as u16);
9372        __tmp.put_u8(self.target_system);
9373        __tmp.put_u8(self.target_component);
9374        __tmp.put_u8(self.confirmation);
9375        if matches!(version, MavlinkVersion::V2) {
9376            let len = __tmp.len();
9377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9378        } else {
9379            __tmp.len()
9380        }
9381    }
9382}
9383#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9384#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9385#[doc = ""]
9386#[doc = "ID: 395"]
9387#[derive(Debug, Clone, PartialEq)]
9388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9390#[cfg_attr(feature = "ts", derive(TS))]
9391#[cfg_attr(feature = "ts", ts(export))]
9392pub struct COMPONENT_INFORMATION_DATA {
9393    #[doc = "Timestamp (time since system boot)."]
9394    pub time_boot_ms: u32,
9395    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9396    pub general_metadata_file_crc: u32,
9397    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9398    pub peripherals_metadata_file_crc: u32,
9399    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9400    #[cfg_attr(feature = "ts", ts(type = "string"))]
9401    pub general_metadata_uri: CharArray<100>,
9402    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9403    #[cfg_attr(feature = "ts", ts(type = "string"))]
9404    pub peripherals_metadata_uri: CharArray<100>,
9405}
9406impl COMPONENT_INFORMATION_DATA {
9407    pub const ENCODED_LEN: usize = 212usize;
9408    pub const DEFAULT: Self = Self {
9409        time_boot_ms: 0_u32,
9410        general_metadata_file_crc: 0_u32,
9411        peripherals_metadata_file_crc: 0_u32,
9412        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9413        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9414    };
9415    #[cfg(feature = "arbitrary")]
9416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9417        use arbitrary::{Arbitrary, Unstructured};
9418        let mut buf = [0u8; 1024];
9419        rng.fill_bytes(&mut buf);
9420        let mut unstructured = Unstructured::new(&buf);
9421        Self::arbitrary(&mut unstructured).unwrap_or_default()
9422    }
9423}
9424impl Default for COMPONENT_INFORMATION_DATA {
9425    fn default() -> Self {
9426        Self::DEFAULT.clone()
9427    }
9428}
9429impl MessageData for COMPONENT_INFORMATION_DATA {
9430    type Message = MavMessage;
9431    const ID: u32 = 395u32;
9432    const NAME: &'static str = "COMPONENT_INFORMATION";
9433    const EXTRA_CRC: u8 = 0u8;
9434    const ENCODED_LEN: usize = 212usize;
9435    fn deser(
9436        _version: MavlinkVersion,
9437        __input: &[u8],
9438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9439        let avail_len = __input.len();
9440        let mut payload_buf = [0; Self::ENCODED_LEN];
9441        let mut buf = if avail_len < Self::ENCODED_LEN {
9442            payload_buf[0..avail_len].copy_from_slice(__input);
9443            Bytes::new(&payload_buf)
9444        } else {
9445            Bytes::new(__input)
9446        };
9447        let mut __struct = Self::default();
9448        __struct.time_boot_ms = buf.get_u32_le();
9449        __struct.general_metadata_file_crc = buf.get_u32_le();
9450        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9451        let mut tmp = [0_u8; 100usize];
9452        for v in &mut tmp {
9453            *v = buf.get_u8();
9454        }
9455        __struct.general_metadata_uri = CharArray::new(tmp);
9456        let mut tmp = [0_u8; 100usize];
9457        for v in &mut tmp {
9458            *v = buf.get_u8();
9459        }
9460        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9461        Ok(__struct)
9462    }
9463    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9464        let mut __tmp = BytesMut::new(bytes);
9465        #[allow(clippy::absurd_extreme_comparisons)]
9466        #[allow(unused_comparisons)]
9467        if __tmp.remaining() < Self::ENCODED_LEN {
9468            panic!(
9469                "buffer is too small (need {} bytes, but got {})",
9470                Self::ENCODED_LEN,
9471                __tmp.remaining(),
9472            )
9473        }
9474        __tmp.put_u32_le(self.time_boot_ms);
9475        __tmp.put_u32_le(self.general_metadata_file_crc);
9476        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9477        for val in &self.general_metadata_uri {
9478            __tmp.put_u8(*val);
9479        }
9480        for val in &self.peripherals_metadata_uri {
9481            __tmp.put_u8(*val);
9482        }
9483        if matches!(version, MavlinkVersion::V2) {
9484            let len = __tmp.len();
9485            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9486        } else {
9487            __tmp.len()
9488        }
9489    }
9490}
9491#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9492#[doc = ""]
9493#[doc = "ID: 396"]
9494#[derive(Debug, Clone, PartialEq)]
9495#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9496#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9497#[cfg_attr(feature = "ts", derive(TS))]
9498#[cfg_attr(feature = "ts", ts(export))]
9499pub struct COMPONENT_INFORMATION_BASIC_DATA {
9500    #[doc = "Component capability flags"]
9501    pub capabilities: MavProtocolCapability,
9502    #[doc = "Timestamp (time since system boot)."]
9503    pub time_boot_ms: u32,
9504    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9505    pub time_manufacture_s: u32,
9506    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9507    #[cfg_attr(feature = "ts", ts(type = "string"))]
9508    pub vendor_name: CharArray<32>,
9509    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9510    #[cfg_attr(feature = "ts", ts(type = "string"))]
9511    pub model_name: CharArray<32>,
9512    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9513    #[cfg_attr(feature = "ts", ts(type = "string"))]
9514    pub software_version: CharArray<24>,
9515    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9516    #[cfg_attr(feature = "ts", ts(type = "string"))]
9517    pub hardware_version: CharArray<24>,
9518    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9519    #[cfg_attr(feature = "ts", ts(type = "string"))]
9520    pub serial_number: CharArray<32>,
9521}
9522impl COMPONENT_INFORMATION_BASIC_DATA {
9523    pub const ENCODED_LEN: usize = 160usize;
9524    pub const DEFAULT: Self = Self {
9525        capabilities: MavProtocolCapability::DEFAULT,
9526        time_boot_ms: 0_u32,
9527        time_manufacture_s: 0_u32,
9528        vendor_name: CharArray::new([0_u8; 32usize]),
9529        model_name: CharArray::new([0_u8; 32usize]),
9530        software_version: CharArray::new([0_u8; 24usize]),
9531        hardware_version: CharArray::new([0_u8; 24usize]),
9532        serial_number: CharArray::new([0_u8; 32usize]),
9533    };
9534    #[cfg(feature = "arbitrary")]
9535    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9536        use arbitrary::{Arbitrary, Unstructured};
9537        let mut buf = [0u8; 1024];
9538        rng.fill_bytes(&mut buf);
9539        let mut unstructured = Unstructured::new(&buf);
9540        Self::arbitrary(&mut unstructured).unwrap_or_default()
9541    }
9542}
9543impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9544    fn default() -> Self {
9545        Self::DEFAULT.clone()
9546    }
9547}
9548impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9549    type Message = MavMessage;
9550    const ID: u32 = 396u32;
9551    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9552    const EXTRA_CRC: u8 = 50u8;
9553    const ENCODED_LEN: usize = 160usize;
9554    fn deser(
9555        _version: MavlinkVersion,
9556        __input: &[u8],
9557    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9558        let avail_len = __input.len();
9559        let mut payload_buf = [0; Self::ENCODED_LEN];
9560        let mut buf = if avail_len < Self::ENCODED_LEN {
9561            payload_buf[0..avail_len].copy_from_slice(__input);
9562            Bytes::new(&payload_buf)
9563        } else {
9564            Bytes::new(__input)
9565        };
9566        let mut __struct = Self::default();
9567        let tmp = buf.get_u64_le();
9568        __struct.capabilities = MavProtocolCapability::from_bits(tmp).ok_or(
9569            ::mavlink_core::error::ParserError::InvalidFlag {
9570                flag_type: "MavProtocolCapability",
9571                value: tmp as u64,
9572            },
9573        )?;
9574        __struct.time_boot_ms = buf.get_u32_le();
9575        __struct.time_manufacture_s = buf.get_u32_le();
9576        let mut tmp = [0_u8; 32usize];
9577        for v in &mut tmp {
9578            *v = buf.get_u8();
9579        }
9580        __struct.vendor_name = CharArray::new(tmp);
9581        let mut tmp = [0_u8; 32usize];
9582        for v in &mut tmp {
9583            *v = buf.get_u8();
9584        }
9585        __struct.model_name = CharArray::new(tmp);
9586        let mut tmp = [0_u8; 24usize];
9587        for v in &mut tmp {
9588            *v = buf.get_u8();
9589        }
9590        __struct.software_version = CharArray::new(tmp);
9591        let mut tmp = [0_u8; 24usize];
9592        for v in &mut tmp {
9593            *v = buf.get_u8();
9594        }
9595        __struct.hardware_version = CharArray::new(tmp);
9596        let mut tmp = [0_u8; 32usize];
9597        for v in &mut tmp {
9598            *v = buf.get_u8();
9599        }
9600        __struct.serial_number = CharArray::new(tmp);
9601        Ok(__struct)
9602    }
9603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9604        let mut __tmp = BytesMut::new(bytes);
9605        #[allow(clippy::absurd_extreme_comparisons)]
9606        #[allow(unused_comparisons)]
9607        if __tmp.remaining() < Self::ENCODED_LEN {
9608            panic!(
9609                "buffer is too small (need {} bytes, but got {})",
9610                Self::ENCODED_LEN,
9611                __tmp.remaining(),
9612            )
9613        }
9614        __tmp.put_u64_le(self.capabilities.bits());
9615        __tmp.put_u32_le(self.time_boot_ms);
9616        __tmp.put_u32_le(self.time_manufacture_s);
9617        for val in &self.vendor_name {
9618            __tmp.put_u8(*val);
9619        }
9620        for val in &self.model_name {
9621            __tmp.put_u8(*val);
9622        }
9623        for val in &self.software_version {
9624            __tmp.put_u8(*val);
9625        }
9626        for val in &self.hardware_version {
9627            __tmp.put_u8(*val);
9628        }
9629        for val in &self.serial_number {
9630            __tmp.put_u8(*val);
9631        }
9632        if matches!(version, MavlinkVersion::V2) {
9633            let len = __tmp.len();
9634            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9635        } else {
9636            __tmp.len()
9637        }
9638    }
9639}
9640#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9641#[doc = ""]
9642#[doc = "ID: 397"]
9643#[derive(Debug, Clone, PartialEq)]
9644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9646#[cfg_attr(feature = "ts", derive(TS))]
9647#[cfg_attr(feature = "ts", ts(export))]
9648pub struct COMPONENT_METADATA_DATA {
9649    #[doc = "Timestamp (time since system boot)."]
9650    pub time_boot_ms: u32,
9651    #[doc = "CRC32 of the general metadata file."]
9652    pub file_crc: u32,
9653    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9654    #[cfg_attr(feature = "ts", ts(type = "string"))]
9655    pub uri: CharArray<100>,
9656}
9657impl COMPONENT_METADATA_DATA {
9658    pub const ENCODED_LEN: usize = 108usize;
9659    pub const DEFAULT: Self = Self {
9660        time_boot_ms: 0_u32,
9661        file_crc: 0_u32,
9662        uri: CharArray::new([0_u8; 100usize]),
9663    };
9664    #[cfg(feature = "arbitrary")]
9665    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9666        use arbitrary::{Arbitrary, Unstructured};
9667        let mut buf = [0u8; 1024];
9668        rng.fill_bytes(&mut buf);
9669        let mut unstructured = Unstructured::new(&buf);
9670        Self::arbitrary(&mut unstructured).unwrap_or_default()
9671    }
9672}
9673impl Default for COMPONENT_METADATA_DATA {
9674    fn default() -> Self {
9675        Self::DEFAULT.clone()
9676    }
9677}
9678impl MessageData for COMPONENT_METADATA_DATA {
9679    type Message = MavMessage;
9680    const ID: u32 = 397u32;
9681    const NAME: &'static str = "COMPONENT_METADATA";
9682    const EXTRA_CRC: u8 = 182u8;
9683    const ENCODED_LEN: usize = 108usize;
9684    fn deser(
9685        _version: MavlinkVersion,
9686        __input: &[u8],
9687    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9688        let avail_len = __input.len();
9689        let mut payload_buf = [0; Self::ENCODED_LEN];
9690        let mut buf = if avail_len < Self::ENCODED_LEN {
9691            payload_buf[0..avail_len].copy_from_slice(__input);
9692            Bytes::new(&payload_buf)
9693        } else {
9694            Bytes::new(__input)
9695        };
9696        let mut __struct = Self::default();
9697        __struct.time_boot_ms = buf.get_u32_le();
9698        __struct.file_crc = buf.get_u32_le();
9699        let mut tmp = [0_u8; 100usize];
9700        for v in &mut tmp {
9701            *v = buf.get_u8();
9702        }
9703        __struct.uri = CharArray::new(tmp);
9704        Ok(__struct)
9705    }
9706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9707        let mut __tmp = BytesMut::new(bytes);
9708        #[allow(clippy::absurd_extreme_comparisons)]
9709        #[allow(unused_comparisons)]
9710        if __tmp.remaining() < Self::ENCODED_LEN {
9711            panic!(
9712                "buffer is too small (need {} bytes, but got {})",
9713                Self::ENCODED_LEN,
9714                __tmp.remaining(),
9715            )
9716        }
9717        __tmp.put_u32_le(self.time_boot_ms);
9718        __tmp.put_u32_le(self.file_crc);
9719        for val in &self.uri {
9720            __tmp.put_u8(*val);
9721        }
9722        if matches!(version, MavlinkVersion::V2) {
9723            let len = __tmp.len();
9724            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9725        } else {
9726            __tmp.len()
9727        }
9728    }
9729}
9730#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9731#[doc = ""]
9732#[doc = "ID: 146"]
9733#[derive(Debug, Clone, PartialEq)]
9734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9736#[cfg_attr(feature = "ts", derive(TS))]
9737#[cfg_attr(feature = "ts", ts(export))]
9738pub struct CONTROL_SYSTEM_STATE_DATA {
9739    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9740    pub time_usec: u64,
9741    #[doc = "X acceleration in body frame"]
9742    pub x_acc: f32,
9743    #[doc = "Y acceleration in body frame"]
9744    pub y_acc: f32,
9745    #[doc = "Z acceleration in body frame"]
9746    pub z_acc: f32,
9747    #[doc = "X velocity in body frame"]
9748    pub x_vel: f32,
9749    #[doc = "Y velocity in body frame"]
9750    pub y_vel: f32,
9751    #[doc = "Z velocity in body frame"]
9752    pub z_vel: f32,
9753    #[doc = "X position in local frame"]
9754    pub x_pos: f32,
9755    #[doc = "Y position in local frame"]
9756    pub y_pos: f32,
9757    #[doc = "Z position in local frame"]
9758    pub z_pos: f32,
9759    #[doc = "Airspeed, set to -1 if unknown"]
9760    pub airspeed: f32,
9761    #[doc = "Variance of body velocity estimate"]
9762    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9763    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9764    pub vel_variance: [f32; 3],
9765    #[doc = "Variance in local position"]
9766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9768    pub pos_variance: [f32; 3],
9769    #[doc = "The attitude, represented as Quaternion"]
9770    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9771    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
9772    pub q: [f32; 4],
9773    #[doc = "Angular rate in roll axis"]
9774    pub roll_rate: f32,
9775    #[doc = "Angular rate in pitch axis"]
9776    pub pitch_rate: f32,
9777    #[doc = "Angular rate in yaw axis"]
9778    pub yaw_rate: f32,
9779}
9780impl CONTROL_SYSTEM_STATE_DATA {
9781    pub const ENCODED_LEN: usize = 100usize;
9782    pub const DEFAULT: Self = Self {
9783        time_usec: 0_u64,
9784        x_acc: 0.0_f32,
9785        y_acc: 0.0_f32,
9786        z_acc: 0.0_f32,
9787        x_vel: 0.0_f32,
9788        y_vel: 0.0_f32,
9789        z_vel: 0.0_f32,
9790        x_pos: 0.0_f32,
9791        y_pos: 0.0_f32,
9792        z_pos: 0.0_f32,
9793        airspeed: 0.0_f32,
9794        vel_variance: [0.0_f32; 3usize],
9795        pos_variance: [0.0_f32; 3usize],
9796        q: [0.0_f32; 4usize],
9797        roll_rate: 0.0_f32,
9798        pitch_rate: 0.0_f32,
9799        yaw_rate: 0.0_f32,
9800    };
9801    #[cfg(feature = "arbitrary")]
9802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9803        use arbitrary::{Arbitrary, Unstructured};
9804        let mut buf = [0u8; 1024];
9805        rng.fill_bytes(&mut buf);
9806        let mut unstructured = Unstructured::new(&buf);
9807        Self::arbitrary(&mut unstructured).unwrap_or_default()
9808    }
9809}
9810impl Default for CONTROL_SYSTEM_STATE_DATA {
9811    fn default() -> Self {
9812        Self::DEFAULT.clone()
9813    }
9814}
9815impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9816    type Message = MavMessage;
9817    const ID: u32 = 146u32;
9818    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9819    const EXTRA_CRC: u8 = 103u8;
9820    const ENCODED_LEN: usize = 100usize;
9821    fn deser(
9822        _version: MavlinkVersion,
9823        __input: &[u8],
9824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9825        let avail_len = __input.len();
9826        let mut payload_buf = [0; Self::ENCODED_LEN];
9827        let mut buf = if avail_len < Self::ENCODED_LEN {
9828            payload_buf[0..avail_len].copy_from_slice(__input);
9829            Bytes::new(&payload_buf)
9830        } else {
9831            Bytes::new(__input)
9832        };
9833        let mut __struct = Self::default();
9834        __struct.time_usec = buf.get_u64_le();
9835        __struct.x_acc = buf.get_f32_le();
9836        __struct.y_acc = buf.get_f32_le();
9837        __struct.z_acc = buf.get_f32_le();
9838        __struct.x_vel = buf.get_f32_le();
9839        __struct.y_vel = buf.get_f32_le();
9840        __struct.z_vel = buf.get_f32_le();
9841        __struct.x_pos = buf.get_f32_le();
9842        __struct.y_pos = buf.get_f32_le();
9843        __struct.z_pos = buf.get_f32_le();
9844        __struct.airspeed = buf.get_f32_le();
9845        for v in &mut __struct.vel_variance {
9846            let val = buf.get_f32_le();
9847            *v = val;
9848        }
9849        for v in &mut __struct.pos_variance {
9850            let val = buf.get_f32_le();
9851            *v = val;
9852        }
9853        for v in &mut __struct.q {
9854            let val = buf.get_f32_le();
9855            *v = val;
9856        }
9857        __struct.roll_rate = buf.get_f32_le();
9858        __struct.pitch_rate = buf.get_f32_le();
9859        __struct.yaw_rate = buf.get_f32_le();
9860        Ok(__struct)
9861    }
9862    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9863        let mut __tmp = BytesMut::new(bytes);
9864        #[allow(clippy::absurd_extreme_comparisons)]
9865        #[allow(unused_comparisons)]
9866        if __tmp.remaining() < Self::ENCODED_LEN {
9867            panic!(
9868                "buffer is too small (need {} bytes, but got {})",
9869                Self::ENCODED_LEN,
9870                __tmp.remaining(),
9871            )
9872        }
9873        __tmp.put_u64_le(self.time_usec);
9874        __tmp.put_f32_le(self.x_acc);
9875        __tmp.put_f32_le(self.y_acc);
9876        __tmp.put_f32_le(self.z_acc);
9877        __tmp.put_f32_le(self.x_vel);
9878        __tmp.put_f32_le(self.y_vel);
9879        __tmp.put_f32_le(self.z_vel);
9880        __tmp.put_f32_le(self.x_pos);
9881        __tmp.put_f32_le(self.y_pos);
9882        __tmp.put_f32_le(self.z_pos);
9883        __tmp.put_f32_le(self.airspeed);
9884        for val in &self.vel_variance {
9885            __tmp.put_f32_le(*val);
9886        }
9887        for val in &self.pos_variance {
9888            __tmp.put_f32_le(*val);
9889        }
9890        for val in &self.q {
9891            __tmp.put_f32_le(*val);
9892        }
9893        __tmp.put_f32_le(self.roll_rate);
9894        __tmp.put_f32_le(self.pitch_rate);
9895        __tmp.put_f32_le(self.yaw_rate);
9896        if matches!(version, MavlinkVersion::V2) {
9897            let len = __tmp.len();
9898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9899        } else {
9900            __tmp.len()
9901        }
9902    }
9903}
9904#[doc = "offset response to encapsulated data."]
9905#[doc = ""]
9906#[doc = "ID: 50005"]
9907#[derive(Debug, Clone, PartialEq)]
9908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9910#[cfg_attr(feature = "ts", derive(TS))]
9911#[cfg_attr(feature = "ts", ts(export))]
9912pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9913    #[doc = "FW Offset."]
9914    pub offset: u32,
9915    #[doc = "System ID."]
9916    pub target_system: u8,
9917    #[doc = "Component ID."]
9918    pub target_component: u8,
9919}
9920impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9921    pub const ENCODED_LEN: usize = 6usize;
9922    pub const DEFAULT: Self = Self {
9923        offset: 0_u32,
9924        target_system: 0_u8,
9925        target_component: 0_u8,
9926    };
9927    #[cfg(feature = "arbitrary")]
9928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9929        use arbitrary::{Arbitrary, Unstructured};
9930        let mut buf = [0u8; 1024];
9931        rng.fill_bytes(&mut buf);
9932        let mut unstructured = Unstructured::new(&buf);
9933        Self::arbitrary(&mut unstructured).unwrap_or_default()
9934    }
9935}
9936impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9937    fn default() -> Self {
9938        Self::DEFAULT.clone()
9939    }
9940}
9941impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9942    type Message = MavMessage;
9943    const ID: u32 = 50005u32;
9944    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
9945    const EXTRA_CRC: u8 = 152u8;
9946    const ENCODED_LEN: usize = 6usize;
9947    fn deser(
9948        _version: MavlinkVersion,
9949        __input: &[u8],
9950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9951        let avail_len = __input.len();
9952        let mut payload_buf = [0; Self::ENCODED_LEN];
9953        let mut buf = if avail_len < Self::ENCODED_LEN {
9954            payload_buf[0..avail_len].copy_from_slice(__input);
9955            Bytes::new(&payload_buf)
9956        } else {
9957            Bytes::new(__input)
9958        };
9959        let mut __struct = Self::default();
9960        __struct.offset = buf.get_u32_le();
9961        __struct.target_system = buf.get_u8();
9962        __struct.target_component = buf.get_u8();
9963        Ok(__struct)
9964    }
9965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9966        let mut __tmp = BytesMut::new(bytes);
9967        #[allow(clippy::absurd_extreme_comparisons)]
9968        #[allow(unused_comparisons)]
9969        if __tmp.remaining() < Self::ENCODED_LEN {
9970            panic!(
9971                "buffer is too small (need {} bytes, but got {})",
9972                Self::ENCODED_LEN,
9973                __tmp.remaining(),
9974            )
9975        }
9976        __tmp.put_u32_le(self.offset);
9977        __tmp.put_u8(self.target_system);
9978        __tmp.put_u8(self.target_component);
9979        if matches!(version, MavlinkVersion::V2) {
9980            let len = __tmp.len();
9981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9982        } else {
9983            __tmp.len()
9984        }
9985    }
9986}
9987#[doc = "Start firmware update with encapsulated data."]
9988#[doc = ""]
9989#[doc = "ID: 50004"]
9990#[derive(Debug, Clone, PartialEq)]
9991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9993#[cfg_attr(feature = "ts", derive(TS))]
9994#[cfg_attr(feature = "ts", ts(export))]
9995pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9996    #[doc = "FW Size."]
9997    pub size: u32,
9998    #[doc = "FW CRC."]
9999    pub crc: u32,
10000    #[doc = "System ID."]
10001    pub target_system: u8,
10002    #[doc = "Component ID."]
10003    pub target_component: u8,
10004}
10005impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10006    pub const ENCODED_LEN: usize = 10usize;
10007    pub const DEFAULT: Self = Self {
10008        size: 0_u32,
10009        crc: 0_u32,
10010        target_system: 0_u8,
10011        target_component: 0_u8,
10012    };
10013    #[cfg(feature = "arbitrary")]
10014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10015        use arbitrary::{Arbitrary, Unstructured};
10016        let mut buf = [0u8; 1024];
10017        rng.fill_bytes(&mut buf);
10018        let mut unstructured = Unstructured::new(&buf);
10019        Self::arbitrary(&mut unstructured).unwrap_or_default()
10020    }
10021}
10022impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10023    fn default() -> Self {
10024        Self::DEFAULT.clone()
10025    }
10026}
10027impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
10028    type Message = MavMessage;
10029    const ID: u32 = 50004u32;
10030    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
10031    const EXTRA_CRC: u8 = 240u8;
10032    const ENCODED_LEN: usize = 10usize;
10033    fn deser(
10034        _version: MavlinkVersion,
10035        __input: &[u8],
10036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10037        let avail_len = __input.len();
10038        let mut payload_buf = [0; Self::ENCODED_LEN];
10039        let mut buf = if avail_len < Self::ENCODED_LEN {
10040            payload_buf[0..avail_len].copy_from_slice(__input);
10041            Bytes::new(&payload_buf)
10042        } else {
10043            Bytes::new(__input)
10044        };
10045        let mut __struct = Self::default();
10046        __struct.size = buf.get_u32_le();
10047        __struct.crc = buf.get_u32_le();
10048        __struct.target_system = buf.get_u8();
10049        __struct.target_component = buf.get_u8();
10050        Ok(__struct)
10051    }
10052    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10053        let mut __tmp = BytesMut::new(bytes);
10054        #[allow(clippy::absurd_extreme_comparisons)]
10055        #[allow(unused_comparisons)]
10056        if __tmp.remaining() < Self::ENCODED_LEN {
10057            panic!(
10058                "buffer is too small (need {} bytes, but got {})",
10059                Self::ENCODED_LEN,
10060                __tmp.remaining(),
10061            )
10062        }
10063        __tmp.put_u32_le(self.size);
10064        __tmp.put_u32_le(self.crc);
10065        __tmp.put_u8(self.target_system);
10066        __tmp.put_u8(self.target_component);
10067        if matches!(version, MavlinkVersion::V2) {
10068            let len = __tmp.len();
10069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10070        } else {
10071            __tmp.len()
10072        }
10073    }
10074}
10075#[doc = "Raw RC Data."]
10076#[doc = ""]
10077#[doc = "ID: 50001"]
10078#[derive(Debug, Clone, PartialEq)]
10079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10081#[cfg_attr(feature = "ts", derive(TS))]
10082#[cfg_attr(feature = "ts", ts(export))]
10083pub struct CUBEPILOT_RAW_RC_DATA {
10084    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10085    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10086    pub rc_raw: [u8; 32],
10087}
10088impl CUBEPILOT_RAW_RC_DATA {
10089    pub const ENCODED_LEN: usize = 32usize;
10090    pub const DEFAULT: Self = Self {
10091        rc_raw: [0_u8; 32usize],
10092    };
10093    #[cfg(feature = "arbitrary")]
10094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10095        use arbitrary::{Arbitrary, Unstructured};
10096        let mut buf = [0u8; 1024];
10097        rng.fill_bytes(&mut buf);
10098        let mut unstructured = Unstructured::new(&buf);
10099        Self::arbitrary(&mut unstructured).unwrap_or_default()
10100    }
10101}
10102impl Default for CUBEPILOT_RAW_RC_DATA {
10103    fn default() -> Self {
10104        Self::DEFAULT.clone()
10105    }
10106}
10107impl MessageData for CUBEPILOT_RAW_RC_DATA {
10108    type Message = MavMessage;
10109    const ID: u32 = 50001u32;
10110    const NAME: &'static str = "CUBEPILOT_RAW_RC";
10111    const EXTRA_CRC: u8 = 246u8;
10112    const ENCODED_LEN: usize = 32usize;
10113    fn deser(
10114        _version: MavlinkVersion,
10115        __input: &[u8],
10116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10117        let avail_len = __input.len();
10118        let mut payload_buf = [0; Self::ENCODED_LEN];
10119        let mut buf = if avail_len < Self::ENCODED_LEN {
10120            payload_buf[0..avail_len].copy_from_slice(__input);
10121            Bytes::new(&payload_buf)
10122        } else {
10123            Bytes::new(__input)
10124        };
10125        let mut __struct = Self::default();
10126        for v in &mut __struct.rc_raw {
10127            let val = buf.get_u8();
10128            *v = val;
10129        }
10130        Ok(__struct)
10131    }
10132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10133        let mut __tmp = BytesMut::new(bytes);
10134        #[allow(clippy::absurd_extreme_comparisons)]
10135        #[allow(unused_comparisons)]
10136        if __tmp.remaining() < Self::ENCODED_LEN {
10137            panic!(
10138                "buffer is too small (need {} bytes, but got {})",
10139                Self::ENCODED_LEN,
10140                __tmp.remaining(),
10141            )
10142        }
10143        for val in &self.rc_raw {
10144            __tmp.put_u8(*val);
10145        }
10146        if matches!(version, MavlinkVersion::V2) {
10147            let len = __tmp.len();
10148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10149        } else {
10150            __tmp.len()
10151        }
10152    }
10153}
10154#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10155#[doc = ""]
10156#[doc = "ID: 411"]
10157#[derive(Debug, Clone, PartialEq)]
10158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10160#[cfg_attr(feature = "ts", derive(TS))]
10161#[cfg_attr(feature = "ts", ts(export))]
10162pub struct CURRENT_EVENT_SEQUENCE_DATA {
10163    #[doc = "Sequence number."]
10164    pub sequence: u16,
10165    #[doc = "Flag bitset."]
10166    pub flags: MavEventCurrentSequenceFlags,
10167}
10168impl CURRENT_EVENT_SEQUENCE_DATA {
10169    pub const ENCODED_LEN: usize = 3usize;
10170    pub const DEFAULT: Self = Self {
10171        sequence: 0_u16,
10172        flags: MavEventCurrentSequenceFlags::DEFAULT,
10173    };
10174    #[cfg(feature = "arbitrary")]
10175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10176        use arbitrary::{Arbitrary, Unstructured};
10177        let mut buf = [0u8; 1024];
10178        rng.fill_bytes(&mut buf);
10179        let mut unstructured = Unstructured::new(&buf);
10180        Self::arbitrary(&mut unstructured).unwrap_or_default()
10181    }
10182}
10183impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10184    fn default() -> Self {
10185        Self::DEFAULT.clone()
10186    }
10187}
10188impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10189    type Message = MavMessage;
10190    const ID: u32 = 411u32;
10191    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10192    const EXTRA_CRC: u8 = 106u8;
10193    const ENCODED_LEN: usize = 3usize;
10194    fn deser(
10195        _version: MavlinkVersion,
10196        __input: &[u8],
10197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10198        let avail_len = __input.len();
10199        let mut payload_buf = [0; Self::ENCODED_LEN];
10200        let mut buf = if avail_len < Self::ENCODED_LEN {
10201            payload_buf[0..avail_len].copy_from_slice(__input);
10202            Bytes::new(&payload_buf)
10203        } else {
10204            Bytes::new(__input)
10205        };
10206        let mut __struct = Self::default();
10207        __struct.sequence = buf.get_u16_le();
10208        let tmp = buf.get_u8();
10209        __struct.flags =
10210            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10211                enum_type: "MavEventCurrentSequenceFlags",
10212                value: tmp as u64,
10213            })?;
10214        Ok(__struct)
10215    }
10216    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10217        let mut __tmp = BytesMut::new(bytes);
10218        #[allow(clippy::absurd_extreme_comparisons)]
10219        #[allow(unused_comparisons)]
10220        if __tmp.remaining() < Self::ENCODED_LEN {
10221            panic!(
10222                "buffer is too small (need {} bytes, but got {})",
10223                Self::ENCODED_LEN,
10224                __tmp.remaining(),
10225            )
10226        }
10227        __tmp.put_u16_le(self.sequence);
10228        __tmp.put_u8(self.flags as u8);
10229        if matches!(version, MavlinkVersion::V2) {
10230            let len = __tmp.len();
10231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10232        } else {
10233            __tmp.len()
10234        }
10235    }
10236}
10237#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10238#[doc = ""]
10239#[doc = "ID: 436"]
10240#[derive(Debug, Clone, PartialEq)]
10241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10243#[cfg_attr(feature = "ts", derive(TS))]
10244#[cfg_attr(feature = "ts", ts(export))]
10245pub struct CURRENT_MODE_DATA {
10246    #[doc = "A bitfield for use for autopilot-specific flags"]
10247    pub custom_mode: u32,
10248    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10249    pub intended_custom_mode: u32,
10250    #[doc = "Standard mode."]
10251    pub standard_mode: MavStandardMode,
10252}
10253impl CURRENT_MODE_DATA {
10254    pub const ENCODED_LEN: usize = 9usize;
10255    pub const DEFAULT: Self = Self {
10256        custom_mode: 0_u32,
10257        intended_custom_mode: 0_u32,
10258        standard_mode: MavStandardMode::DEFAULT,
10259    };
10260    #[cfg(feature = "arbitrary")]
10261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10262        use arbitrary::{Arbitrary, Unstructured};
10263        let mut buf = [0u8; 1024];
10264        rng.fill_bytes(&mut buf);
10265        let mut unstructured = Unstructured::new(&buf);
10266        Self::arbitrary(&mut unstructured).unwrap_or_default()
10267    }
10268}
10269impl Default for CURRENT_MODE_DATA {
10270    fn default() -> Self {
10271        Self::DEFAULT.clone()
10272    }
10273}
10274impl MessageData for CURRENT_MODE_DATA {
10275    type Message = MavMessage;
10276    const ID: u32 = 436u32;
10277    const NAME: &'static str = "CURRENT_MODE";
10278    const EXTRA_CRC: u8 = 193u8;
10279    const ENCODED_LEN: usize = 9usize;
10280    fn deser(
10281        _version: MavlinkVersion,
10282        __input: &[u8],
10283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10284        let avail_len = __input.len();
10285        let mut payload_buf = [0; Self::ENCODED_LEN];
10286        let mut buf = if avail_len < Self::ENCODED_LEN {
10287            payload_buf[0..avail_len].copy_from_slice(__input);
10288            Bytes::new(&payload_buf)
10289        } else {
10290            Bytes::new(__input)
10291        };
10292        let mut __struct = Self::default();
10293        __struct.custom_mode = buf.get_u32_le();
10294        __struct.intended_custom_mode = buf.get_u32_le();
10295        let tmp = buf.get_u8();
10296        __struct.standard_mode =
10297            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10298                enum_type: "MavStandardMode",
10299                value: tmp as u64,
10300            })?;
10301        Ok(__struct)
10302    }
10303    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10304        let mut __tmp = BytesMut::new(bytes);
10305        #[allow(clippy::absurd_extreme_comparisons)]
10306        #[allow(unused_comparisons)]
10307        if __tmp.remaining() < Self::ENCODED_LEN {
10308            panic!(
10309                "buffer is too small (need {} bytes, but got {})",
10310                Self::ENCODED_LEN,
10311                __tmp.remaining(),
10312            )
10313        }
10314        __tmp.put_u32_le(self.custom_mode);
10315        __tmp.put_u32_le(self.intended_custom_mode);
10316        __tmp.put_u8(self.standard_mode as u8);
10317        if matches!(version, MavlinkVersion::V2) {
10318            let len = __tmp.len();
10319            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10320        } else {
10321            __tmp.len()
10322        }
10323    }
10324}
10325#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10326#[doc = "Data stream status information."]
10327#[doc = ""]
10328#[doc = "ID: 67"]
10329#[derive(Debug, Clone, PartialEq)]
10330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10332#[cfg_attr(feature = "ts", derive(TS))]
10333#[cfg_attr(feature = "ts", ts(export))]
10334pub struct DATA_STREAM_DATA {
10335    #[doc = "The message rate"]
10336    pub message_rate: u16,
10337    #[doc = "The ID of the requested data stream"]
10338    pub stream_id: u8,
10339    #[doc = "1 stream is enabled, 0 stream is stopped."]
10340    pub on_off: u8,
10341}
10342impl DATA_STREAM_DATA {
10343    pub const ENCODED_LEN: usize = 4usize;
10344    pub const DEFAULT: Self = Self {
10345        message_rate: 0_u16,
10346        stream_id: 0_u8,
10347        on_off: 0_u8,
10348    };
10349    #[cfg(feature = "arbitrary")]
10350    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10351        use arbitrary::{Arbitrary, Unstructured};
10352        let mut buf = [0u8; 1024];
10353        rng.fill_bytes(&mut buf);
10354        let mut unstructured = Unstructured::new(&buf);
10355        Self::arbitrary(&mut unstructured).unwrap_or_default()
10356    }
10357}
10358impl Default for DATA_STREAM_DATA {
10359    fn default() -> Self {
10360        Self::DEFAULT.clone()
10361    }
10362}
10363impl MessageData for DATA_STREAM_DATA {
10364    type Message = MavMessage;
10365    const ID: u32 = 67u32;
10366    const NAME: &'static str = "DATA_STREAM";
10367    const EXTRA_CRC: u8 = 21u8;
10368    const ENCODED_LEN: usize = 4usize;
10369    fn deser(
10370        _version: MavlinkVersion,
10371        __input: &[u8],
10372    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10373        let avail_len = __input.len();
10374        let mut payload_buf = [0; Self::ENCODED_LEN];
10375        let mut buf = if avail_len < Self::ENCODED_LEN {
10376            payload_buf[0..avail_len].copy_from_slice(__input);
10377            Bytes::new(&payload_buf)
10378        } else {
10379            Bytes::new(__input)
10380        };
10381        let mut __struct = Self::default();
10382        __struct.message_rate = buf.get_u16_le();
10383        __struct.stream_id = buf.get_u8();
10384        __struct.on_off = buf.get_u8();
10385        Ok(__struct)
10386    }
10387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10388        let mut __tmp = BytesMut::new(bytes);
10389        #[allow(clippy::absurd_extreme_comparisons)]
10390        #[allow(unused_comparisons)]
10391        if __tmp.remaining() < Self::ENCODED_LEN {
10392            panic!(
10393                "buffer is too small (need {} bytes, but got {})",
10394                Self::ENCODED_LEN,
10395                __tmp.remaining(),
10396            )
10397        }
10398        __tmp.put_u16_le(self.message_rate);
10399        __tmp.put_u8(self.stream_id);
10400        __tmp.put_u8(self.on_off);
10401        if matches!(version, MavlinkVersion::V2) {
10402            let len = __tmp.len();
10403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10404        } else {
10405            __tmp.len()
10406        }
10407    }
10408}
10409#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10410#[doc = ""]
10411#[doc = "ID: 130"]
10412#[derive(Debug, Clone, PartialEq)]
10413#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10414#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10415#[cfg_attr(feature = "ts", derive(TS))]
10416#[cfg_attr(feature = "ts", ts(export))]
10417pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10418    #[doc = "total data size (set on ACK only)."]
10419    pub size: u32,
10420    #[doc = "Width of a matrix or image."]
10421    pub width: u16,
10422    #[doc = "Height of a matrix or image."]
10423    pub height: u16,
10424    #[doc = "Number of packets being sent (set on ACK only)."]
10425    pub packets: u16,
10426    #[doc = "Type of requested/acknowledged data."]
10427    pub mavtype: MavlinkDataStreamType,
10428    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10429    pub payload: u8,
10430    #[doc = "JPEG quality. Values: [1-100]."]
10431    pub jpg_quality: u8,
10432}
10433impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10434    pub const ENCODED_LEN: usize = 13usize;
10435    pub const DEFAULT: Self = Self {
10436        size: 0_u32,
10437        width: 0_u16,
10438        height: 0_u16,
10439        packets: 0_u16,
10440        mavtype: MavlinkDataStreamType::DEFAULT,
10441        payload: 0_u8,
10442        jpg_quality: 0_u8,
10443    };
10444    #[cfg(feature = "arbitrary")]
10445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10446        use arbitrary::{Arbitrary, Unstructured};
10447        let mut buf = [0u8; 1024];
10448        rng.fill_bytes(&mut buf);
10449        let mut unstructured = Unstructured::new(&buf);
10450        Self::arbitrary(&mut unstructured).unwrap_or_default()
10451    }
10452}
10453impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10454    fn default() -> Self {
10455        Self::DEFAULT.clone()
10456    }
10457}
10458impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10459    type Message = MavMessage;
10460    const ID: u32 = 130u32;
10461    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10462    const EXTRA_CRC: u8 = 29u8;
10463    const ENCODED_LEN: usize = 13usize;
10464    fn deser(
10465        _version: MavlinkVersion,
10466        __input: &[u8],
10467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10468        let avail_len = __input.len();
10469        let mut payload_buf = [0; Self::ENCODED_LEN];
10470        let mut buf = if avail_len < Self::ENCODED_LEN {
10471            payload_buf[0..avail_len].copy_from_slice(__input);
10472            Bytes::new(&payload_buf)
10473        } else {
10474            Bytes::new(__input)
10475        };
10476        let mut __struct = Self::default();
10477        __struct.size = buf.get_u32_le();
10478        __struct.width = buf.get_u16_le();
10479        __struct.height = buf.get_u16_le();
10480        __struct.packets = buf.get_u16_le();
10481        let tmp = buf.get_u8();
10482        __struct.mavtype =
10483            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10484                enum_type: "MavlinkDataStreamType",
10485                value: tmp as u64,
10486            })?;
10487        __struct.payload = buf.get_u8();
10488        __struct.jpg_quality = buf.get_u8();
10489        Ok(__struct)
10490    }
10491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10492        let mut __tmp = BytesMut::new(bytes);
10493        #[allow(clippy::absurd_extreme_comparisons)]
10494        #[allow(unused_comparisons)]
10495        if __tmp.remaining() < Self::ENCODED_LEN {
10496            panic!(
10497                "buffer is too small (need {} bytes, but got {})",
10498                Self::ENCODED_LEN,
10499                __tmp.remaining(),
10500            )
10501        }
10502        __tmp.put_u32_le(self.size);
10503        __tmp.put_u16_le(self.width);
10504        __tmp.put_u16_le(self.height);
10505        __tmp.put_u16_le(self.packets);
10506        __tmp.put_u8(self.mavtype as u8);
10507        __tmp.put_u8(self.payload);
10508        __tmp.put_u8(self.jpg_quality);
10509        if matches!(version, MavlinkVersion::V2) {
10510            let len = __tmp.len();
10511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10512        } else {
10513            __tmp.len()
10514        }
10515    }
10516}
10517#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10518#[doc = ""]
10519#[doc = "ID: 254"]
10520#[derive(Debug, Clone, PartialEq)]
10521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10523#[cfg_attr(feature = "ts", derive(TS))]
10524#[cfg_attr(feature = "ts", ts(export))]
10525pub struct DEBUG_DATA {
10526    #[doc = "Timestamp (time since system boot)."]
10527    pub time_boot_ms: u32,
10528    #[doc = "DEBUG value"]
10529    pub value: f32,
10530    #[doc = "index of debug variable"]
10531    pub ind: u8,
10532}
10533impl DEBUG_DATA {
10534    pub const ENCODED_LEN: usize = 9usize;
10535    pub const DEFAULT: Self = Self {
10536        time_boot_ms: 0_u32,
10537        value: 0.0_f32,
10538        ind: 0_u8,
10539    };
10540    #[cfg(feature = "arbitrary")]
10541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10542        use arbitrary::{Arbitrary, Unstructured};
10543        let mut buf = [0u8; 1024];
10544        rng.fill_bytes(&mut buf);
10545        let mut unstructured = Unstructured::new(&buf);
10546        Self::arbitrary(&mut unstructured).unwrap_or_default()
10547    }
10548}
10549impl Default for DEBUG_DATA {
10550    fn default() -> Self {
10551        Self::DEFAULT.clone()
10552    }
10553}
10554impl MessageData for DEBUG_DATA {
10555    type Message = MavMessage;
10556    const ID: u32 = 254u32;
10557    const NAME: &'static str = "DEBUG";
10558    const EXTRA_CRC: u8 = 46u8;
10559    const ENCODED_LEN: usize = 9usize;
10560    fn deser(
10561        _version: MavlinkVersion,
10562        __input: &[u8],
10563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10564        let avail_len = __input.len();
10565        let mut payload_buf = [0; Self::ENCODED_LEN];
10566        let mut buf = if avail_len < Self::ENCODED_LEN {
10567            payload_buf[0..avail_len].copy_from_slice(__input);
10568            Bytes::new(&payload_buf)
10569        } else {
10570            Bytes::new(__input)
10571        };
10572        let mut __struct = Self::default();
10573        __struct.time_boot_ms = buf.get_u32_le();
10574        __struct.value = buf.get_f32_le();
10575        __struct.ind = buf.get_u8();
10576        Ok(__struct)
10577    }
10578    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10579        let mut __tmp = BytesMut::new(bytes);
10580        #[allow(clippy::absurd_extreme_comparisons)]
10581        #[allow(unused_comparisons)]
10582        if __tmp.remaining() < Self::ENCODED_LEN {
10583            panic!(
10584                "buffer is too small (need {} bytes, but got {})",
10585                Self::ENCODED_LEN,
10586                __tmp.remaining(),
10587            )
10588        }
10589        __tmp.put_u32_le(self.time_boot_ms);
10590        __tmp.put_f32_le(self.value);
10591        __tmp.put_u8(self.ind);
10592        if matches!(version, MavlinkVersion::V2) {
10593            let len = __tmp.len();
10594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10595        } else {
10596            __tmp.len()
10597        }
10598    }
10599}
10600#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10601#[doc = ""]
10602#[doc = "ID: 350"]
10603#[derive(Debug, Clone, PartialEq)]
10604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10606#[cfg_attr(feature = "ts", derive(TS))]
10607#[cfg_attr(feature = "ts", ts(export))]
10608pub struct DEBUG_FLOAT_ARRAY_DATA {
10609    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10610    pub time_usec: u64,
10611    #[doc = "Unique ID used to discriminate between arrays"]
10612    pub array_id: u16,
10613    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10614    #[cfg_attr(feature = "ts", ts(type = "string"))]
10615    pub name: CharArray<10>,
10616    #[doc = "data"]
10617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10618    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10619    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10620    pub data: [f32; 58],
10621}
10622impl DEBUG_FLOAT_ARRAY_DATA {
10623    pub const ENCODED_LEN: usize = 252usize;
10624    pub const DEFAULT: Self = Self {
10625        time_usec: 0_u64,
10626        array_id: 0_u16,
10627        name: CharArray::new([0_u8; 10usize]),
10628        data: [0.0_f32; 58usize],
10629    };
10630    #[cfg(feature = "arbitrary")]
10631    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10632        use arbitrary::{Arbitrary, Unstructured};
10633        let mut buf = [0u8; 1024];
10634        rng.fill_bytes(&mut buf);
10635        let mut unstructured = Unstructured::new(&buf);
10636        Self::arbitrary(&mut unstructured).unwrap_or_default()
10637    }
10638}
10639impl Default for DEBUG_FLOAT_ARRAY_DATA {
10640    fn default() -> Self {
10641        Self::DEFAULT.clone()
10642    }
10643}
10644impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10645    type Message = MavMessage;
10646    const ID: u32 = 350u32;
10647    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10648    const EXTRA_CRC: u8 = 232u8;
10649    const ENCODED_LEN: usize = 252usize;
10650    fn deser(
10651        _version: MavlinkVersion,
10652        __input: &[u8],
10653    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10654        let avail_len = __input.len();
10655        let mut payload_buf = [0; Self::ENCODED_LEN];
10656        let mut buf = if avail_len < Self::ENCODED_LEN {
10657            payload_buf[0..avail_len].copy_from_slice(__input);
10658            Bytes::new(&payload_buf)
10659        } else {
10660            Bytes::new(__input)
10661        };
10662        let mut __struct = Self::default();
10663        __struct.time_usec = buf.get_u64_le();
10664        __struct.array_id = buf.get_u16_le();
10665        let mut tmp = [0_u8; 10usize];
10666        for v in &mut tmp {
10667            *v = buf.get_u8();
10668        }
10669        __struct.name = CharArray::new(tmp);
10670        for v in &mut __struct.data {
10671            let val = buf.get_f32_le();
10672            *v = val;
10673        }
10674        Ok(__struct)
10675    }
10676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10677        let mut __tmp = BytesMut::new(bytes);
10678        #[allow(clippy::absurd_extreme_comparisons)]
10679        #[allow(unused_comparisons)]
10680        if __tmp.remaining() < Self::ENCODED_LEN {
10681            panic!(
10682                "buffer is too small (need {} bytes, but got {})",
10683                Self::ENCODED_LEN,
10684                __tmp.remaining(),
10685            )
10686        }
10687        __tmp.put_u64_le(self.time_usec);
10688        __tmp.put_u16_le(self.array_id);
10689        for val in &self.name {
10690            __tmp.put_u8(*val);
10691        }
10692        if matches!(version, MavlinkVersion::V2) {
10693            for val in &self.data {
10694                __tmp.put_f32_le(*val);
10695            }
10696            let len = __tmp.len();
10697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10698        } else {
10699            __tmp.len()
10700        }
10701    }
10702}
10703#[doc = "To debug something using a named 3D vector."]
10704#[doc = ""]
10705#[doc = "ID: 250"]
10706#[derive(Debug, Clone, PartialEq)]
10707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10709#[cfg_attr(feature = "ts", derive(TS))]
10710#[cfg_attr(feature = "ts", ts(export))]
10711pub struct DEBUG_VECT_DATA {
10712    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10713    pub time_usec: u64,
10714    #[doc = "x"]
10715    pub x: f32,
10716    #[doc = "y"]
10717    pub y: f32,
10718    #[doc = "z"]
10719    pub z: f32,
10720    #[doc = "Name"]
10721    #[cfg_attr(feature = "ts", ts(type = "string"))]
10722    pub name: CharArray<10>,
10723}
10724impl DEBUG_VECT_DATA {
10725    pub const ENCODED_LEN: usize = 30usize;
10726    pub const DEFAULT: Self = Self {
10727        time_usec: 0_u64,
10728        x: 0.0_f32,
10729        y: 0.0_f32,
10730        z: 0.0_f32,
10731        name: CharArray::new([0_u8; 10usize]),
10732    };
10733    #[cfg(feature = "arbitrary")]
10734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10735        use arbitrary::{Arbitrary, Unstructured};
10736        let mut buf = [0u8; 1024];
10737        rng.fill_bytes(&mut buf);
10738        let mut unstructured = Unstructured::new(&buf);
10739        Self::arbitrary(&mut unstructured).unwrap_or_default()
10740    }
10741}
10742impl Default for DEBUG_VECT_DATA {
10743    fn default() -> Self {
10744        Self::DEFAULT.clone()
10745    }
10746}
10747impl MessageData for DEBUG_VECT_DATA {
10748    type Message = MavMessage;
10749    const ID: u32 = 250u32;
10750    const NAME: &'static str = "DEBUG_VECT";
10751    const EXTRA_CRC: u8 = 49u8;
10752    const ENCODED_LEN: usize = 30usize;
10753    fn deser(
10754        _version: MavlinkVersion,
10755        __input: &[u8],
10756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10757        let avail_len = __input.len();
10758        let mut payload_buf = [0; Self::ENCODED_LEN];
10759        let mut buf = if avail_len < Self::ENCODED_LEN {
10760            payload_buf[0..avail_len].copy_from_slice(__input);
10761            Bytes::new(&payload_buf)
10762        } else {
10763            Bytes::new(__input)
10764        };
10765        let mut __struct = Self::default();
10766        __struct.time_usec = buf.get_u64_le();
10767        __struct.x = buf.get_f32_le();
10768        __struct.y = buf.get_f32_le();
10769        __struct.z = buf.get_f32_le();
10770        let mut tmp = [0_u8; 10usize];
10771        for v in &mut tmp {
10772            *v = buf.get_u8();
10773        }
10774        __struct.name = CharArray::new(tmp);
10775        Ok(__struct)
10776    }
10777    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10778        let mut __tmp = BytesMut::new(bytes);
10779        #[allow(clippy::absurd_extreme_comparisons)]
10780        #[allow(unused_comparisons)]
10781        if __tmp.remaining() < Self::ENCODED_LEN {
10782            panic!(
10783                "buffer is too small (need {} bytes, but got {})",
10784                Self::ENCODED_LEN,
10785                __tmp.remaining(),
10786            )
10787        }
10788        __tmp.put_u64_le(self.time_usec);
10789        __tmp.put_f32_le(self.x);
10790        __tmp.put_f32_le(self.y);
10791        __tmp.put_f32_le(self.z);
10792        for val in &self.name {
10793            __tmp.put_u8(*val);
10794        }
10795        if matches!(version, MavlinkVersion::V2) {
10796            let len = __tmp.len();
10797            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10798        } else {
10799            __tmp.len()
10800        }
10801    }
10802}
10803#[doc = "Distance sensor information for an onboard rangefinder."]
10804#[doc = ""]
10805#[doc = "ID: 132"]
10806#[derive(Debug, Clone, PartialEq)]
10807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10809#[cfg_attr(feature = "ts", derive(TS))]
10810#[cfg_attr(feature = "ts", ts(export))]
10811pub struct DISTANCE_SENSOR_DATA {
10812    #[doc = "Timestamp (time since system boot)."]
10813    pub time_boot_ms: u32,
10814    #[doc = "Minimum distance the sensor can measure"]
10815    pub min_distance: u16,
10816    #[doc = "Maximum distance the sensor can measure"]
10817    pub max_distance: u16,
10818    #[doc = "Current distance reading"]
10819    pub current_distance: u16,
10820    #[doc = "Type of distance sensor."]
10821    pub mavtype: MavDistanceSensor,
10822    #[doc = "Onboard ID of the sensor"]
10823    pub id: u8,
10824    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10825    pub orientation: MavSensorOrientation,
10826    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10827    pub covariance: u8,
10828    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10830    pub horizontal_fov: f32,
10831    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10833    pub vertical_fov: f32,
10834    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10837    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10838    pub quaternion: [f32; 4],
10839    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10840    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10841    pub signal_quality: u8,
10842}
10843impl DISTANCE_SENSOR_DATA {
10844    pub const ENCODED_LEN: usize = 39usize;
10845    pub const DEFAULT: Self = Self {
10846        time_boot_ms: 0_u32,
10847        min_distance: 0_u16,
10848        max_distance: 0_u16,
10849        current_distance: 0_u16,
10850        mavtype: MavDistanceSensor::DEFAULT,
10851        id: 0_u8,
10852        orientation: MavSensorOrientation::DEFAULT,
10853        covariance: 0_u8,
10854        horizontal_fov: 0.0_f32,
10855        vertical_fov: 0.0_f32,
10856        quaternion: [0.0_f32; 4usize],
10857        signal_quality: 0_u8,
10858    };
10859    #[cfg(feature = "arbitrary")]
10860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10861        use arbitrary::{Arbitrary, Unstructured};
10862        let mut buf = [0u8; 1024];
10863        rng.fill_bytes(&mut buf);
10864        let mut unstructured = Unstructured::new(&buf);
10865        Self::arbitrary(&mut unstructured).unwrap_or_default()
10866    }
10867}
10868impl Default for DISTANCE_SENSOR_DATA {
10869    fn default() -> Self {
10870        Self::DEFAULT.clone()
10871    }
10872}
10873impl MessageData for DISTANCE_SENSOR_DATA {
10874    type Message = MavMessage;
10875    const ID: u32 = 132u32;
10876    const NAME: &'static str = "DISTANCE_SENSOR";
10877    const EXTRA_CRC: u8 = 85u8;
10878    const ENCODED_LEN: usize = 39usize;
10879    fn deser(
10880        _version: MavlinkVersion,
10881        __input: &[u8],
10882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10883        let avail_len = __input.len();
10884        let mut payload_buf = [0; Self::ENCODED_LEN];
10885        let mut buf = if avail_len < Self::ENCODED_LEN {
10886            payload_buf[0..avail_len].copy_from_slice(__input);
10887            Bytes::new(&payload_buf)
10888        } else {
10889            Bytes::new(__input)
10890        };
10891        let mut __struct = Self::default();
10892        __struct.time_boot_ms = buf.get_u32_le();
10893        __struct.min_distance = buf.get_u16_le();
10894        __struct.max_distance = buf.get_u16_le();
10895        __struct.current_distance = buf.get_u16_le();
10896        let tmp = buf.get_u8();
10897        __struct.mavtype =
10898            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10899                enum_type: "MavDistanceSensor",
10900                value: tmp as u64,
10901            })?;
10902        __struct.id = buf.get_u8();
10903        let tmp = buf.get_u8();
10904        __struct.orientation =
10905            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10906                enum_type: "MavSensorOrientation",
10907                value: tmp as u64,
10908            })?;
10909        __struct.covariance = buf.get_u8();
10910        __struct.horizontal_fov = buf.get_f32_le();
10911        __struct.vertical_fov = buf.get_f32_le();
10912        for v in &mut __struct.quaternion {
10913            let val = buf.get_f32_le();
10914            *v = val;
10915        }
10916        __struct.signal_quality = buf.get_u8();
10917        Ok(__struct)
10918    }
10919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10920        let mut __tmp = BytesMut::new(bytes);
10921        #[allow(clippy::absurd_extreme_comparisons)]
10922        #[allow(unused_comparisons)]
10923        if __tmp.remaining() < Self::ENCODED_LEN {
10924            panic!(
10925                "buffer is too small (need {} bytes, but got {})",
10926                Self::ENCODED_LEN,
10927                __tmp.remaining(),
10928            )
10929        }
10930        __tmp.put_u32_le(self.time_boot_ms);
10931        __tmp.put_u16_le(self.min_distance);
10932        __tmp.put_u16_le(self.max_distance);
10933        __tmp.put_u16_le(self.current_distance);
10934        __tmp.put_u8(self.mavtype as u8);
10935        __tmp.put_u8(self.id);
10936        __tmp.put_u8(self.orientation as u8);
10937        __tmp.put_u8(self.covariance);
10938        if matches!(version, MavlinkVersion::V2) {
10939            __tmp.put_f32_le(self.horizontal_fov);
10940            __tmp.put_f32_le(self.vertical_fov);
10941            for val in &self.quaternion {
10942                __tmp.put_f32_le(*val);
10943            }
10944            __tmp.put_u8(self.signal_quality);
10945            let len = __tmp.len();
10946            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10947        } else {
10948            __tmp.len()
10949        }
10950    }
10951}
10952#[doc = "EFI status output."]
10953#[doc = ""]
10954#[doc = "ID: 225"]
10955#[derive(Debug, Clone, PartialEq)]
10956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10957#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10958#[cfg_attr(feature = "ts", derive(TS))]
10959#[cfg_attr(feature = "ts", ts(export))]
10960pub struct EFI_STATUS_DATA {
10961    #[doc = "ECU index"]
10962    pub ecu_index: f32,
10963    #[doc = "RPM"]
10964    pub rpm: f32,
10965    #[doc = "Fuel consumed"]
10966    pub fuel_consumed: f32,
10967    #[doc = "Fuel flow rate"]
10968    pub fuel_flow: f32,
10969    #[doc = "Engine load"]
10970    pub engine_load: f32,
10971    #[doc = "Throttle position"]
10972    pub throttle_position: f32,
10973    #[doc = "Spark dwell time"]
10974    pub spark_dwell_time: f32,
10975    #[doc = "Barometric pressure"]
10976    pub barometric_pressure: f32,
10977    #[doc = "Intake manifold pressure("]
10978    pub intake_manifold_pressure: f32,
10979    #[doc = "Intake manifold temperature"]
10980    pub intake_manifold_temperature: f32,
10981    #[doc = "Cylinder head temperature"]
10982    pub cylinder_head_temperature: f32,
10983    #[doc = "Ignition timing (Crank angle degrees)"]
10984    pub ignition_timing: f32,
10985    #[doc = "Injection time"]
10986    pub injection_time: f32,
10987    #[doc = "Exhaust gas temperature"]
10988    pub exhaust_gas_temperature: f32,
10989    #[doc = "Output throttle"]
10990    pub throttle_out: f32,
10991    #[doc = "Pressure/temperature compensation"]
10992    pub pt_compensation: f32,
10993    #[doc = "EFI health status"]
10994    pub health: u8,
10995    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10996    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10997    pub ignition_voltage: f32,
10998    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10999    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11000    pub fuel_pressure: f32,
11001}
11002impl EFI_STATUS_DATA {
11003    pub const ENCODED_LEN: usize = 73usize;
11004    pub const DEFAULT: Self = Self {
11005        ecu_index: 0.0_f32,
11006        rpm: 0.0_f32,
11007        fuel_consumed: 0.0_f32,
11008        fuel_flow: 0.0_f32,
11009        engine_load: 0.0_f32,
11010        throttle_position: 0.0_f32,
11011        spark_dwell_time: 0.0_f32,
11012        barometric_pressure: 0.0_f32,
11013        intake_manifold_pressure: 0.0_f32,
11014        intake_manifold_temperature: 0.0_f32,
11015        cylinder_head_temperature: 0.0_f32,
11016        ignition_timing: 0.0_f32,
11017        injection_time: 0.0_f32,
11018        exhaust_gas_temperature: 0.0_f32,
11019        throttle_out: 0.0_f32,
11020        pt_compensation: 0.0_f32,
11021        health: 0_u8,
11022        ignition_voltage: 0.0_f32,
11023        fuel_pressure: 0.0_f32,
11024    };
11025    #[cfg(feature = "arbitrary")]
11026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11027        use arbitrary::{Arbitrary, Unstructured};
11028        let mut buf = [0u8; 1024];
11029        rng.fill_bytes(&mut buf);
11030        let mut unstructured = Unstructured::new(&buf);
11031        Self::arbitrary(&mut unstructured).unwrap_or_default()
11032    }
11033}
11034impl Default for EFI_STATUS_DATA {
11035    fn default() -> Self {
11036        Self::DEFAULT.clone()
11037    }
11038}
11039impl MessageData for EFI_STATUS_DATA {
11040    type Message = MavMessage;
11041    const ID: u32 = 225u32;
11042    const NAME: &'static str = "EFI_STATUS";
11043    const EXTRA_CRC: u8 = 208u8;
11044    const ENCODED_LEN: usize = 73usize;
11045    fn deser(
11046        _version: MavlinkVersion,
11047        __input: &[u8],
11048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11049        let avail_len = __input.len();
11050        let mut payload_buf = [0; Self::ENCODED_LEN];
11051        let mut buf = if avail_len < Self::ENCODED_LEN {
11052            payload_buf[0..avail_len].copy_from_slice(__input);
11053            Bytes::new(&payload_buf)
11054        } else {
11055            Bytes::new(__input)
11056        };
11057        let mut __struct = Self::default();
11058        __struct.ecu_index = buf.get_f32_le();
11059        __struct.rpm = buf.get_f32_le();
11060        __struct.fuel_consumed = buf.get_f32_le();
11061        __struct.fuel_flow = buf.get_f32_le();
11062        __struct.engine_load = buf.get_f32_le();
11063        __struct.throttle_position = buf.get_f32_le();
11064        __struct.spark_dwell_time = buf.get_f32_le();
11065        __struct.barometric_pressure = buf.get_f32_le();
11066        __struct.intake_manifold_pressure = buf.get_f32_le();
11067        __struct.intake_manifold_temperature = buf.get_f32_le();
11068        __struct.cylinder_head_temperature = buf.get_f32_le();
11069        __struct.ignition_timing = buf.get_f32_le();
11070        __struct.injection_time = buf.get_f32_le();
11071        __struct.exhaust_gas_temperature = buf.get_f32_le();
11072        __struct.throttle_out = buf.get_f32_le();
11073        __struct.pt_compensation = buf.get_f32_le();
11074        __struct.health = buf.get_u8();
11075        __struct.ignition_voltage = buf.get_f32_le();
11076        __struct.fuel_pressure = buf.get_f32_le();
11077        Ok(__struct)
11078    }
11079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11080        let mut __tmp = BytesMut::new(bytes);
11081        #[allow(clippy::absurd_extreme_comparisons)]
11082        #[allow(unused_comparisons)]
11083        if __tmp.remaining() < Self::ENCODED_LEN {
11084            panic!(
11085                "buffer is too small (need {} bytes, but got {})",
11086                Self::ENCODED_LEN,
11087                __tmp.remaining(),
11088            )
11089        }
11090        __tmp.put_f32_le(self.ecu_index);
11091        __tmp.put_f32_le(self.rpm);
11092        __tmp.put_f32_le(self.fuel_consumed);
11093        __tmp.put_f32_le(self.fuel_flow);
11094        __tmp.put_f32_le(self.engine_load);
11095        __tmp.put_f32_le(self.throttle_position);
11096        __tmp.put_f32_le(self.spark_dwell_time);
11097        __tmp.put_f32_le(self.barometric_pressure);
11098        __tmp.put_f32_le(self.intake_manifold_pressure);
11099        __tmp.put_f32_le(self.intake_manifold_temperature);
11100        __tmp.put_f32_le(self.cylinder_head_temperature);
11101        __tmp.put_f32_le(self.ignition_timing);
11102        __tmp.put_f32_le(self.injection_time);
11103        __tmp.put_f32_le(self.exhaust_gas_temperature);
11104        __tmp.put_f32_le(self.throttle_out);
11105        __tmp.put_f32_le(self.pt_compensation);
11106        __tmp.put_u8(self.health);
11107        if matches!(version, MavlinkVersion::V2) {
11108            __tmp.put_f32_le(self.ignition_voltage);
11109            __tmp.put_f32_le(self.fuel_pressure);
11110            let len = __tmp.len();
11111            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11112        } else {
11113            __tmp.len()
11114        }
11115    }
11116}
11117#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11118#[doc = ""]
11119#[doc = "ID: 131"]
11120#[derive(Debug, Clone, PartialEq)]
11121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11123#[cfg_attr(feature = "ts", derive(TS))]
11124#[cfg_attr(feature = "ts", ts(export))]
11125pub struct ENCAPSULATED_DATA_DATA {
11126    #[doc = "sequence number (starting with 0 on every transmission)"]
11127    pub seqnr: u16,
11128    #[doc = "image data bytes"]
11129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11130    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11131    pub data: [u8; 253],
11132}
11133impl ENCAPSULATED_DATA_DATA {
11134    pub const ENCODED_LEN: usize = 255usize;
11135    pub const DEFAULT: Self = Self {
11136        seqnr: 0_u16,
11137        data: [0_u8; 253usize],
11138    };
11139    #[cfg(feature = "arbitrary")]
11140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11141        use arbitrary::{Arbitrary, Unstructured};
11142        let mut buf = [0u8; 1024];
11143        rng.fill_bytes(&mut buf);
11144        let mut unstructured = Unstructured::new(&buf);
11145        Self::arbitrary(&mut unstructured).unwrap_or_default()
11146    }
11147}
11148impl Default for ENCAPSULATED_DATA_DATA {
11149    fn default() -> Self {
11150        Self::DEFAULT.clone()
11151    }
11152}
11153impl MessageData for ENCAPSULATED_DATA_DATA {
11154    type Message = MavMessage;
11155    const ID: u32 = 131u32;
11156    const NAME: &'static str = "ENCAPSULATED_DATA";
11157    const EXTRA_CRC: u8 = 223u8;
11158    const ENCODED_LEN: usize = 255usize;
11159    fn deser(
11160        _version: MavlinkVersion,
11161        __input: &[u8],
11162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11163        let avail_len = __input.len();
11164        let mut payload_buf = [0; Self::ENCODED_LEN];
11165        let mut buf = if avail_len < Self::ENCODED_LEN {
11166            payload_buf[0..avail_len].copy_from_slice(__input);
11167            Bytes::new(&payload_buf)
11168        } else {
11169            Bytes::new(__input)
11170        };
11171        let mut __struct = Self::default();
11172        __struct.seqnr = buf.get_u16_le();
11173        for v in &mut __struct.data {
11174            let val = buf.get_u8();
11175            *v = val;
11176        }
11177        Ok(__struct)
11178    }
11179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11180        let mut __tmp = BytesMut::new(bytes);
11181        #[allow(clippy::absurd_extreme_comparisons)]
11182        #[allow(unused_comparisons)]
11183        if __tmp.remaining() < Self::ENCODED_LEN {
11184            panic!(
11185                "buffer is too small (need {} bytes, but got {})",
11186                Self::ENCODED_LEN,
11187                __tmp.remaining(),
11188            )
11189        }
11190        __tmp.put_u16_le(self.seqnr);
11191        for val in &self.data {
11192            __tmp.put_u8(*val);
11193        }
11194        if matches!(version, MavlinkVersion::V2) {
11195            let len = __tmp.len();
11196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11197        } else {
11198            __tmp.len()
11199        }
11200    }
11201}
11202#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11203#[doc = ""]
11204#[doc = "ID: 290"]
11205#[derive(Debug, Clone, PartialEq)]
11206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11208#[cfg_attr(feature = "ts", derive(TS))]
11209#[cfg_attr(feature = "ts", ts(export))]
11210pub struct ESC_INFO_DATA {
11211    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11212    pub time_usec: u64,
11213    #[doc = "Number of reported errors by each ESC since boot."]
11214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11216    pub error_count: [u32; 4],
11217    #[doc = "Counter of data packets received."]
11218    pub counter: u16,
11219    #[doc = "Bitmap of ESC failure flags."]
11220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11221    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11222    pub failure_flags: [u16; 4],
11223    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11225    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11226    pub temperature: [i16; 4],
11227    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11228    pub index: u8,
11229    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11230    pub count: u8,
11231    #[doc = "Connection type protocol for all ESC."]
11232    pub connection_type: EscConnectionType,
11233    #[doc = "Information regarding online/offline status of each ESC."]
11234    pub info: u8,
11235}
11236impl ESC_INFO_DATA {
11237    pub const ENCODED_LEN: usize = 46usize;
11238    pub const DEFAULT: Self = Self {
11239        time_usec: 0_u64,
11240        error_count: [0_u32; 4usize],
11241        counter: 0_u16,
11242        failure_flags: [0_u16; 4usize],
11243        temperature: [0_i16; 4usize],
11244        index: 0_u8,
11245        count: 0_u8,
11246        connection_type: EscConnectionType::DEFAULT,
11247        info: 0_u8,
11248    };
11249    #[cfg(feature = "arbitrary")]
11250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11251        use arbitrary::{Arbitrary, Unstructured};
11252        let mut buf = [0u8; 1024];
11253        rng.fill_bytes(&mut buf);
11254        let mut unstructured = Unstructured::new(&buf);
11255        Self::arbitrary(&mut unstructured).unwrap_or_default()
11256    }
11257}
11258impl Default for ESC_INFO_DATA {
11259    fn default() -> Self {
11260        Self::DEFAULT.clone()
11261    }
11262}
11263impl MessageData for ESC_INFO_DATA {
11264    type Message = MavMessage;
11265    const ID: u32 = 290u32;
11266    const NAME: &'static str = "ESC_INFO";
11267    const EXTRA_CRC: u8 = 251u8;
11268    const ENCODED_LEN: usize = 46usize;
11269    fn deser(
11270        _version: MavlinkVersion,
11271        __input: &[u8],
11272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11273        let avail_len = __input.len();
11274        let mut payload_buf = [0; Self::ENCODED_LEN];
11275        let mut buf = if avail_len < Self::ENCODED_LEN {
11276            payload_buf[0..avail_len].copy_from_slice(__input);
11277            Bytes::new(&payload_buf)
11278        } else {
11279            Bytes::new(__input)
11280        };
11281        let mut __struct = Self::default();
11282        __struct.time_usec = buf.get_u64_le();
11283        for v in &mut __struct.error_count {
11284            let val = buf.get_u32_le();
11285            *v = val;
11286        }
11287        __struct.counter = buf.get_u16_le();
11288        for v in &mut __struct.failure_flags {
11289            let val = buf.get_u16_le();
11290            *v = val;
11291        }
11292        for v in &mut __struct.temperature {
11293            let val = buf.get_i16_le();
11294            *v = val;
11295        }
11296        __struct.index = buf.get_u8();
11297        __struct.count = buf.get_u8();
11298        let tmp = buf.get_u8();
11299        __struct.connection_type =
11300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11301                enum_type: "EscConnectionType",
11302                value: tmp as u64,
11303            })?;
11304        __struct.info = buf.get_u8();
11305        Ok(__struct)
11306    }
11307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11308        let mut __tmp = BytesMut::new(bytes);
11309        #[allow(clippy::absurd_extreme_comparisons)]
11310        #[allow(unused_comparisons)]
11311        if __tmp.remaining() < Self::ENCODED_LEN {
11312            panic!(
11313                "buffer is too small (need {} bytes, but got {})",
11314                Self::ENCODED_LEN,
11315                __tmp.remaining(),
11316            )
11317        }
11318        __tmp.put_u64_le(self.time_usec);
11319        for val in &self.error_count {
11320            __tmp.put_u32_le(*val);
11321        }
11322        __tmp.put_u16_le(self.counter);
11323        for val in &self.failure_flags {
11324            __tmp.put_u16_le(*val);
11325        }
11326        for val in &self.temperature {
11327            __tmp.put_i16_le(*val);
11328        }
11329        __tmp.put_u8(self.index);
11330        __tmp.put_u8(self.count);
11331        __tmp.put_u8(self.connection_type as u8);
11332        __tmp.put_u8(self.info);
11333        if matches!(version, MavlinkVersion::V2) {
11334            let len = __tmp.len();
11335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11336        } else {
11337            __tmp.len()
11338        }
11339    }
11340}
11341#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11342#[doc = ""]
11343#[doc = "ID: 291"]
11344#[derive(Debug, Clone, PartialEq)]
11345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11347#[cfg_attr(feature = "ts", derive(TS))]
11348#[cfg_attr(feature = "ts", ts(export))]
11349pub struct ESC_STATUS_DATA {
11350    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11351    pub time_usec: u64,
11352    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11354    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11355    pub rpm: [i32; 4],
11356    #[doc = "Voltage measured from each ESC."]
11357    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11358    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11359    pub voltage: [f32; 4],
11360    #[doc = "Current measured from each ESC."]
11361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11362    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11363    pub current: [f32; 4],
11364    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11365    pub index: u8,
11366}
11367impl ESC_STATUS_DATA {
11368    pub const ENCODED_LEN: usize = 57usize;
11369    pub const DEFAULT: Self = Self {
11370        time_usec: 0_u64,
11371        rpm: [0_i32; 4usize],
11372        voltage: [0.0_f32; 4usize],
11373        current: [0.0_f32; 4usize],
11374        index: 0_u8,
11375    };
11376    #[cfg(feature = "arbitrary")]
11377    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11378        use arbitrary::{Arbitrary, Unstructured};
11379        let mut buf = [0u8; 1024];
11380        rng.fill_bytes(&mut buf);
11381        let mut unstructured = Unstructured::new(&buf);
11382        Self::arbitrary(&mut unstructured).unwrap_or_default()
11383    }
11384}
11385impl Default for ESC_STATUS_DATA {
11386    fn default() -> Self {
11387        Self::DEFAULT.clone()
11388    }
11389}
11390impl MessageData for ESC_STATUS_DATA {
11391    type Message = MavMessage;
11392    const ID: u32 = 291u32;
11393    const NAME: &'static str = "ESC_STATUS";
11394    const EXTRA_CRC: u8 = 10u8;
11395    const ENCODED_LEN: usize = 57usize;
11396    fn deser(
11397        _version: MavlinkVersion,
11398        __input: &[u8],
11399    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11400        let avail_len = __input.len();
11401        let mut payload_buf = [0; Self::ENCODED_LEN];
11402        let mut buf = if avail_len < Self::ENCODED_LEN {
11403            payload_buf[0..avail_len].copy_from_slice(__input);
11404            Bytes::new(&payload_buf)
11405        } else {
11406            Bytes::new(__input)
11407        };
11408        let mut __struct = Self::default();
11409        __struct.time_usec = buf.get_u64_le();
11410        for v in &mut __struct.rpm {
11411            let val = buf.get_i32_le();
11412            *v = val;
11413        }
11414        for v in &mut __struct.voltage {
11415            let val = buf.get_f32_le();
11416            *v = val;
11417        }
11418        for v in &mut __struct.current {
11419            let val = buf.get_f32_le();
11420            *v = val;
11421        }
11422        __struct.index = buf.get_u8();
11423        Ok(__struct)
11424    }
11425    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11426        let mut __tmp = BytesMut::new(bytes);
11427        #[allow(clippy::absurd_extreme_comparisons)]
11428        #[allow(unused_comparisons)]
11429        if __tmp.remaining() < Self::ENCODED_LEN {
11430            panic!(
11431                "buffer is too small (need {} bytes, but got {})",
11432                Self::ENCODED_LEN,
11433                __tmp.remaining(),
11434            )
11435        }
11436        __tmp.put_u64_le(self.time_usec);
11437        for val in &self.rpm {
11438            __tmp.put_i32_le(*val);
11439        }
11440        for val in &self.voltage {
11441            __tmp.put_f32_le(*val);
11442        }
11443        for val in &self.current {
11444            __tmp.put_f32_le(*val);
11445        }
11446        __tmp.put_u8(self.index);
11447        if matches!(version, MavlinkVersion::V2) {
11448            let len = __tmp.len();
11449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11450        } else {
11451            __tmp.len()
11452        }
11453    }
11454}
11455#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11456#[doc = ""]
11457#[doc = "ID: 230"]
11458#[derive(Debug, Clone, PartialEq)]
11459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11461#[cfg_attr(feature = "ts", derive(TS))]
11462#[cfg_attr(feature = "ts", ts(export))]
11463pub struct ESTIMATOR_STATUS_DATA {
11464    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11465    pub time_usec: u64,
11466    #[doc = "Velocity innovation test ratio"]
11467    pub vel_ratio: f32,
11468    #[doc = "Horizontal position innovation test ratio"]
11469    pub pos_horiz_ratio: f32,
11470    #[doc = "Vertical position innovation test ratio"]
11471    pub pos_vert_ratio: f32,
11472    #[doc = "Magnetometer innovation test ratio"]
11473    pub mag_ratio: f32,
11474    #[doc = "Height above terrain innovation test ratio"]
11475    pub hagl_ratio: f32,
11476    #[doc = "True airspeed innovation test ratio"]
11477    pub tas_ratio: f32,
11478    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11479    pub pos_horiz_accuracy: f32,
11480    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11481    pub pos_vert_accuracy: f32,
11482    #[doc = "Bitmap indicating which EKF outputs are valid."]
11483    pub flags: EstimatorStatusFlags,
11484}
11485impl ESTIMATOR_STATUS_DATA {
11486    pub const ENCODED_LEN: usize = 42usize;
11487    pub const DEFAULT: Self = Self {
11488        time_usec: 0_u64,
11489        vel_ratio: 0.0_f32,
11490        pos_horiz_ratio: 0.0_f32,
11491        pos_vert_ratio: 0.0_f32,
11492        mag_ratio: 0.0_f32,
11493        hagl_ratio: 0.0_f32,
11494        tas_ratio: 0.0_f32,
11495        pos_horiz_accuracy: 0.0_f32,
11496        pos_vert_accuracy: 0.0_f32,
11497        flags: EstimatorStatusFlags::DEFAULT,
11498    };
11499    #[cfg(feature = "arbitrary")]
11500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11501        use arbitrary::{Arbitrary, Unstructured};
11502        let mut buf = [0u8; 1024];
11503        rng.fill_bytes(&mut buf);
11504        let mut unstructured = Unstructured::new(&buf);
11505        Self::arbitrary(&mut unstructured).unwrap_or_default()
11506    }
11507}
11508impl Default for ESTIMATOR_STATUS_DATA {
11509    fn default() -> Self {
11510        Self::DEFAULT.clone()
11511    }
11512}
11513impl MessageData for ESTIMATOR_STATUS_DATA {
11514    type Message = MavMessage;
11515    const ID: u32 = 230u32;
11516    const NAME: &'static str = "ESTIMATOR_STATUS";
11517    const EXTRA_CRC: u8 = 163u8;
11518    const ENCODED_LEN: usize = 42usize;
11519    fn deser(
11520        _version: MavlinkVersion,
11521        __input: &[u8],
11522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11523        let avail_len = __input.len();
11524        let mut payload_buf = [0; Self::ENCODED_LEN];
11525        let mut buf = if avail_len < Self::ENCODED_LEN {
11526            payload_buf[0..avail_len].copy_from_slice(__input);
11527            Bytes::new(&payload_buf)
11528        } else {
11529            Bytes::new(__input)
11530        };
11531        let mut __struct = Self::default();
11532        __struct.time_usec = buf.get_u64_le();
11533        __struct.vel_ratio = buf.get_f32_le();
11534        __struct.pos_horiz_ratio = buf.get_f32_le();
11535        __struct.pos_vert_ratio = buf.get_f32_le();
11536        __struct.mag_ratio = buf.get_f32_le();
11537        __struct.hagl_ratio = buf.get_f32_le();
11538        __struct.tas_ratio = buf.get_f32_le();
11539        __struct.pos_horiz_accuracy = buf.get_f32_le();
11540        __struct.pos_vert_accuracy = buf.get_f32_le();
11541        let tmp = buf.get_u16_le();
11542        __struct.flags = EstimatorStatusFlags::from_bits(tmp).ok_or(
11543            ::mavlink_core::error::ParserError::InvalidFlag {
11544                flag_type: "EstimatorStatusFlags",
11545                value: tmp as u64,
11546            },
11547        )?;
11548        Ok(__struct)
11549    }
11550    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11551        let mut __tmp = BytesMut::new(bytes);
11552        #[allow(clippy::absurd_extreme_comparisons)]
11553        #[allow(unused_comparisons)]
11554        if __tmp.remaining() < Self::ENCODED_LEN {
11555            panic!(
11556                "buffer is too small (need {} bytes, but got {})",
11557                Self::ENCODED_LEN,
11558                __tmp.remaining(),
11559            )
11560        }
11561        __tmp.put_u64_le(self.time_usec);
11562        __tmp.put_f32_le(self.vel_ratio);
11563        __tmp.put_f32_le(self.pos_horiz_ratio);
11564        __tmp.put_f32_le(self.pos_vert_ratio);
11565        __tmp.put_f32_le(self.mag_ratio);
11566        __tmp.put_f32_le(self.hagl_ratio);
11567        __tmp.put_f32_le(self.tas_ratio);
11568        __tmp.put_f32_le(self.pos_horiz_accuracy);
11569        __tmp.put_f32_le(self.pos_vert_accuracy);
11570        __tmp.put_u16_le(self.flags.bits());
11571        if matches!(version, MavlinkVersion::V2) {
11572            let len = __tmp.len();
11573            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11574        } else {
11575            __tmp.len()
11576        }
11577    }
11578}
11579#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11580#[doc = ""]
11581#[doc = "ID: 410"]
11582#[derive(Debug, Clone, PartialEq)]
11583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11585#[cfg_attr(feature = "ts", derive(TS))]
11586#[cfg_attr(feature = "ts", ts(export))]
11587pub struct EVENT_DATA {
11588    #[doc = "Event ID (as defined in the component metadata)"]
11589    pub id: u32,
11590    #[doc = "Timestamp (time since system boot when the event happened)."]
11591    pub event_time_boot_ms: u32,
11592    #[doc = "Sequence number."]
11593    pub sequence: u16,
11594    #[doc = "Component ID"]
11595    pub destination_component: u8,
11596    #[doc = "System ID"]
11597    pub destination_system: u8,
11598    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11599    pub log_levels: u8,
11600    #[doc = "Arguments (depend on event ID)."]
11601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11602    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11603    pub arguments: [u8; 40],
11604}
11605impl EVENT_DATA {
11606    pub const ENCODED_LEN: usize = 53usize;
11607    pub const DEFAULT: Self = Self {
11608        id: 0_u32,
11609        event_time_boot_ms: 0_u32,
11610        sequence: 0_u16,
11611        destination_component: 0_u8,
11612        destination_system: 0_u8,
11613        log_levels: 0_u8,
11614        arguments: [0_u8; 40usize],
11615    };
11616    #[cfg(feature = "arbitrary")]
11617    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11618        use arbitrary::{Arbitrary, Unstructured};
11619        let mut buf = [0u8; 1024];
11620        rng.fill_bytes(&mut buf);
11621        let mut unstructured = Unstructured::new(&buf);
11622        Self::arbitrary(&mut unstructured).unwrap_or_default()
11623    }
11624}
11625impl Default for EVENT_DATA {
11626    fn default() -> Self {
11627        Self::DEFAULT.clone()
11628    }
11629}
11630impl MessageData for EVENT_DATA {
11631    type Message = MavMessage;
11632    const ID: u32 = 410u32;
11633    const NAME: &'static str = "EVENT";
11634    const EXTRA_CRC: u8 = 160u8;
11635    const ENCODED_LEN: usize = 53usize;
11636    fn deser(
11637        _version: MavlinkVersion,
11638        __input: &[u8],
11639    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11640        let avail_len = __input.len();
11641        let mut payload_buf = [0; Self::ENCODED_LEN];
11642        let mut buf = if avail_len < Self::ENCODED_LEN {
11643            payload_buf[0..avail_len].copy_from_slice(__input);
11644            Bytes::new(&payload_buf)
11645        } else {
11646            Bytes::new(__input)
11647        };
11648        let mut __struct = Self::default();
11649        __struct.id = buf.get_u32_le();
11650        __struct.event_time_boot_ms = buf.get_u32_le();
11651        __struct.sequence = buf.get_u16_le();
11652        __struct.destination_component = buf.get_u8();
11653        __struct.destination_system = buf.get_u8();
11654        __struct.log_levels = buf.get_u8();
11655        for v in &mut __struct.arguments {
11656            let val = buf.get_u8();
11657            *v = val;
11658        }
11659        Ok(__struct)
11660    }
11661    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11662        let mut __tmp = BytesMut::new(bytes);
11663        #[allow(clippy::absurd_extreme_comparisons)]
11664        #[allow(unused_comparisons)]
11665        if __tmp.remaining() < Self::ENCODED_LEN {
11666            panic!(
11667                "buffer is too small (need {} bytes, but got {})",
11668                Self::ENCODED_LEN,
11669                __tmp.remaining(),
11670            )
11671        }
11672        __tmp.put_u32_le(self.id);
11673        __tmp.put_u32_le(self.event_time_boot_ms);
11674        __tmp.put_u16_le(self.sequence);
11675        __tmp.put_u8(self.destination_component);
11676        __tmp.put_u8(self.destination_system);
11677        __tmp.put_u8(self.log_levels);
11678        for val in &self.arguments {
11679            __tmp.put_u8(*val);
11680        }
11681        if matches!(version, MavlinkVersion::V2) {
11682            let len = __tmp.len();
11683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11684        } else {
11685            __tmp.len()
11686        }
11687    }
11688}
11689#[doc = "Provides state for additional features."]
11690#[doc = ""]
11691#[doc = "ID: 245"]
11692#[derive(Debug, Clone, PartialEq)]
11693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11694#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11695#[cfg_attr(feature = "ts", derive(TS))]
11696#[cfg_attr(feature = "ts", ts(export))]
11697pub struct EXTENDED_SYS_STATE_DATA {
11698    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11699    pub vtol_state: MavVtolState,
11700    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11701    pub landed_state: MavLandedState,
11702}
11703impl EXTENDED_SYS_STATE_DATA {
11704    pub const ENCODED_LEN: usize = 2usize;
11705    pub const DEFAULT: Self = Self {
11706        vtol_state: MavVtolState::DEFAULT,
11707        landed_state: MavLandedState::DEFAULT,
11708    };
11709    #[cfg(feature = "arbitrary")]
11710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11711        use arbitrary::{Arbitrary, Unstructured};
11712        let mut buf = [0u8; 1024];
11713        rng.fill_bytes(&mut buf);
11714        let mut unstructured = Unstructured::new(&buf);
11715        Self::arbitrary(&mut unstructured).unwrap_or_default()
11716    }
11717}
11718impl Default for EXTENDED_SYS_STATE_DATA {
11719    fn default() -> Self {
11720        Self::DEFAULT.clone()
11721    }
11722}
11723impl MessageData for EXTENDED_SYS_STATE_DATA {
11724    type Message = MavMessage;
11725    const ID: u32 = 245u32;
11726    const NAME: &'static str = "EXTENDED_SYS_STATE";
11727    const EXTRA_CRC: u8 = 130u8;
11728    const ENCODED_LEN: usize = 2usize;
11729    fn deser(
11730        _version: MavlinkVersion,
11731        __input: &[u8],
11732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11733        let avail_len = __input.len();
11734        let mut payload_buf = [0; Self::ENCODED_LEN];
11735        let mut buf = if avail_len < Self::ENCODED_LEN {
11736            payload_buf[0..avail_len].copy_from_slice(__input);
11737            Bytes::new(&payload_buf)
11738        } else {
11739            Bytes::new(__input)
11740        };
11741        let mut __struct = Self::default();
11742        let tmp = buf.get_u8();
11743        __struct.vtol_state =
11744            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11745                enum_type: "MavVtolState",
11746                value: tmp as u64,
11747            })?;
11748        let tmp = buf.get_u8();
11749        __struct.landed_state =
11750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11751                enum_type: "MavLandedState",
11752                value: tmp as u64,
11753            })?;
11754        Ok(__struct)
11755    }
11756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11757        let mut __tmp = BytesMut::new(bytes);
11758        #[allow(clippy::absurd_extreme_comparisons)]
11759        #[allow(unused_comparisons)]
11760        if __tmp.remaining() < Self::ENCODED_LEN {
11761            panic!(
11762                "buffer is too small (need {} bytes, but got {})",
11763                Self::ENCODED_LEN,
11764                __tmp.remaining(),
11765            )
11766        }
11767        __tmp.put_u8(self.vtol_state as u8);
11768        __tmp.put_u8(self.landed_state as u8);
11769        if matches!(version, MavlinkVersion::V2) {
11770            let len = __tmp.len();
11771            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11772        } else {
11773            __tmp.len()
11774        }
11775    }
11776}
11777#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11778#[doc = ""]
11779#[doc = "ID: 162"]
11780#[derive(Debug, Clone, PartialEq)]
11781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11783#[cfg_attr(feature = "ts", derive(TS))]
11784#[cfg_attr(feature = "ts", ts(export))]
11785pub struct FENCE_STATUS_DATA {
11786    #[doc = "Time (since boot) of last breach."]
11787    pub breach_time: u32,
11788    #[doc = "Number of fence breaches."]
11789    pub breach_count: u16,
11790    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11791    pub breach_status: u8,
11792    #[doc = "Last breach type."]
11793    pub breach_type: FenceBreach,
11794    #[doc = "Active action to prevent fence breach"]
11795    #[cfg_attr(feature = "serde", serde(default))]
11796    pub breach_mitigation: FenceMitigate,
11797}
11798impl FENCE_STATUS_DATA {
11799    pub const ENCODED_LEN: usize = 9usize;
11800    pub const DEFAULT: Self = Self {
11801        breach_time: 0_u32,
11802        breach_count: 0_u16,
11803        breach_status: 0_u8,
11804        breach_type: FenceBreach::DEFAULT,
11805        breach_mitigation: FenceMitigate::DEFAULT,
11806    };
11807    #[cfg(feature = "arbitrary")]
11808    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11809        use arbitrary::{Arbitrary, Unstructured};
11810        let mut buf = [0u8; 1024];
11811        rng.fill_bytes(&mut buf);
11812        let mut unstructured = Unstructured::new(&buf);
11813        Self::arbitrary(&mut unstructured).unwrap_or_default()
11814    }
11815}
11816impl Default for FENCE_STATUS_DATA {
11817    fn default() -> Self {
11818        Self::DEFAULT.clone()
11819    }
11820}
11821impl MessageData for FENCE_STATUS_DATA {
11822    type Message = MavMessage;
11823    const ID: u32 = 162u32;
11824    const NAME: &'static str = "FENCE_STATUS";
11825    const EXTRA_CRC: u8 = 189u8;
11826    const ENCODED_LEN: usize = 9usize;
11827    fn deser(
11828        _version: MavlinkVersion,
11829        __input: &[u8],
11830    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11831        let avail_len = __input.len();
11832        let mut payload_buf = [0; Self::ENCODED_LEN];
11833        let mut buf = if avail_len < Self::ENCODED_LEN {
11834            payload_buf[0..avail_len].copy_from_slice(__input);
11835            Bytes::new(&payload_buf)
11836        } else {
11837            Bytes::new(__input)
11838        };
11839        let mut __struct = Self::default();
11840        __struct.breach_time = buf.get_u32_le();
11841        __struct.breach_count = buf.get_u16_le();
11842        __struct.breach_status = buf.get_u8();
11843        let tmp = buf.get_u8();
11844        __struct.breach_type =
11845            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11846                enum_type: "FenceBreach",
11847                value: tmp as u64,
11848            })?;
11849        let tmp = buf.get_u8();
11850        __struct.breach_mitigation =
11851            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11852                enum_type: "FenceMitigate",
11853                value: tmp as u64,
11854            })?;
11855        Ok(__struct)
11856    }
11857    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11858        let mut __tmp = BytesMut::new(bytes);
11859        #[allow(clippy::absurd_extreme_comparisons)]
11860        #[allow(unused_comparisons)]
11861        if __tmp.remaining() < Self::ENCODED_LEN {
11862            panic!(
11863                "buffer is too small (need {} bytes, but got {})",
11864                Self::ENCODED_LEN,
11865                __tmp.remaining(),
11866            )
11867        }
11868        __tmp.put_u32_le(self.breach_time);
11869        __tmp.put_u16_le(self.breach_count);
11870        __tmp.put_u8(self.breach_status);
11871        __tmp.put_u8(self.breach_type as u8);
11872        if matches!(version, MavlinkVersion::V2) {
11873            __tmp.put_u8(self.breach_mitigation as u8);
11874            let len = __tmp.len();
11875            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11876        } else {
11877            __tmp.len()
11878        }
11879    }
11880}
11881#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11882#[doc = ""]
11883#[doc = "ID: 110"]
11884#[derive(Debug, Clone, PartialEq)]
11885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11886#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11887#[cfg_attr(feature = "ts", derive(TS))]
11888#[cfg_attr(feature = "ts", ts(export))]
11889pub struct FILE_TRANSFER_PROTOCOL_DATA {
11890    #[doc = "Network ID (0 for broadcast)"]
11891    pub target_network: u8,
11892    #[doc = "System ID (0 for broadcast)"]
11893    pub target_system: u8,
11894    #[doc = "Component ID (0 for broadcast)"]
11895    pub target_component: u8,
11896    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11897    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11898    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11899    pub payload: [u8; 251],
11900}
11901impl FILE_TRANSFER_PROTOCOL_DATA {
11902    pub const ENCODED_LEN: usize = 254usize;
11903    pub const DEFAULT: Self = Self {
11904        target_network: 0_u8,
11905        target_system: 0_u8,
11906        target_component: 0_u8,
11907        payload: [0_u8; 251usize],
11908    };
11909    #[cfg(feature = "arbitrary")]
11910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11911        use arbitrary::{Arbitrary, Unstructured};
11912        let mut buf = [0u8; 1024];
11913        rng.fill_bytes(&mut buf);
11914        let mut unstructured = Unstructured::new(&buf);
11915        Self::arbitrary(&mut unstructured).unwrap_or_default()
11916    }
11917}
11918impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11919    fn default() -> Self {
11920        Self::DEFAULT.clone()
11921    }
11922}
11923impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11924    type Message = MavMessage;
11925    const ID: u32 = 110u32;
11926    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11927    const EXTRA_CRC: u8 = 84u8;
11928    const ENCODED_LEN: usize = 254usize;
11929    fn deser(
11930        _version: MavlinkVersion,
11931        __input: &[u8],
11932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11933        let avail_len = __input.len();
11934        let mut payload_buf = [0; Self::ENCODED_LEN];
11935        let mut buf = if avail_len < Self::ENCODED_LEN {
11936            payload_buf[0..avail_len].copy_from_slice(__input);
11937            Bytes::new(&payload_buf)
11938        } else {
11939            Bytes::new(__input)
11940        };
11941        let mut __struct = Self::default();
11942        __struct.target_network = buf.get_u8();
11943        __struct.target_system = buf.get_u8();
11944        __struct.target_component = buf.get_u8();
11945        for v in &mut __struct.payload {
11946            let val = buf.get_u8();
11947            *v = val;
11948        }
11949        Ok(__struct)
11950    }
11951    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11952        let mut __tmp = BytesMut::new(bytes);
11953        #[allow(clippy::absurd_extreme_comparisons)]
11954        #[allow(unused_comparisons)]
11955        if __tmp.remaining() < Self::ENCODED_LEN {
11956            panic!(
11957                "buffer is too small (need {} bytes, but got {})",
11958                Self::ENCODED_LEN,
11959                __tmp.remaining(),
11960            )
11961        }
11962        __tmp.put_u8(self.target_network);
11963        __tmp.put_u8(self.target_system);
11964        __tmp.put_u8(self.target_component);
11965        for val in &self.payload {
11966            __tmp.put_u8(*val);
11967        }
11968        if matches!(version, MavlinkVersion::V2) {
11969            let len = __tmp.len();
11970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11971        } else {
11972            __tmp.len()
11973        }
11974    }
11975}
11976#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11977#[doc = ""]
11978#[doc = "ID: 264"]
11979#[derive(Debug, Clone, PartialEq)]
11980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11981#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11982#[cfg_attr(feature = "ts", derive(TS))]
11983#[cfg_attr(feature = "ts", ts(export))]
11984pub struct FLIGHT_INFORMATION_DATA {
11985    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11986    pub arming_time_utc: u64,
11987    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11988    pub takeoff_time_utc: u64,
11989    #[doc = "Flight number. Note, field is misnamed UUID."]
11990    pub flight_uuid: u64,
11991    #[doc = "Timestamp (time since system boot)."]
11992    pub time_boot_ms: u32,
11993    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11995    pub landing_time: u32,
11996}
11997impl FLIGHT_INFORMATION_DATA {
11998    pub const ENCODED_LEN: usize = 32usize;
11999    pub const DEFAULT: Self = Self {
12000        arming_time_utc: 0_u64,
12001        takeoff_time_utc: 0_u64,
12002        flight_uuid: 0_u64,
12003        time_boot_ms: 0_u32,
12004        landing_time: 0_u32,
12005    };
12006    #[cfg(feature = "arbitrary")]
12007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12008        use arbitrary::{Arbitrary, Unstructured};
12009        let mut buf = [0u8; 1024];
12010        rng.fill_bytes(&mut buf);
12011        let mut unstructured = Unstructured::new(&buf);
12012        Self::arbitrary(&mut unstructured).unwrap_or_default()
12013    }
12014}
12015impl Default for FLIGHT_INFORMATION_DATA {
12016    fn default() -> Self {
12017        Self::DEFAULT.clone()
12018    }
12019}
12020impl MessageData for FLIGHT_INFORMATION_DATA {
12021    type Message = MavMessage;
12022    const ID: u32 = 264u32;
12023    const NAME: &'static str = "FLIGHT_INFORMATION";
12024    const EXTRA_CRC: u8 = 49u8;
12025    const ENCODED_LEN: usize = 32usize;
12026    fn deser(
12027        _version: MavlinkVersion,
12028        __input: &[u8],
12029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12030        let avail_len = __input.len();
12031        let mut payload_buf = [0; Self::ENCODED_LEN];
12032        let mut buf = if avail_len < Self::ENCODED_LEN {
12033            payload_buf[0..avail_len].copy_from_slice(__input);
12034            Bytes::new(&payload_buf)
12035        } else {
12036            Bytes::new(__input)
12037        };
12038        let mut __struct = Self::default();
12039        __struct.arming_time_utc = buf.get_u64_le();
12040        __struct.takeoff_time_utc = buf.get_u64_le();
12041        __struct.flight_uuid = buf.get_u64_le();
12042        __struct.time_boot_ms = buf.get_u32_le();
12043        __struct.landing_time = buf.get_u32_le();
12044        Ok(__struct)
12045    }
12046    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12047        let mut __tmp = BytesMut::new(bytes);
12048        #[allow(clippy::absurd_extreme_comparisons)]
12049        #[allow(unused_comparisons)]
12050        if __tmp.remaining() < Self::ENCODED_LEN {
12051            panic!(
12052                "buffer is too small (need {} bytes, but got {})",
12053                Self::ENCODED_LEN,
12054                __tmp.remaining(),
12055            )
12056        }
12057        __tmp.put_u64_le(self.arming_time_utc);
12058        __tmp.put_u64_le(self.takeoff_time_utc);
12059        __tmp.put_u64_le(self.flight_uuid);
12060        __tmp.put_u32_le(self.time_boot_ms);
12061        if matches!(version, MavlinkVersion::V2) {
12062            __tmp.put_u32_le(self.landing_time);
12063            let len = __tmp.len();
12064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12065        } else {
12066            __tmp.len()
12067        }
12068    }
12069}
12070#[doc = "Current motion information from a designated system."]
12071#[doc = ""]
12072#[doc = "ID: 144"]
12073#[derive(Debug, Clone, PartialEq)]
12074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12076#[cfg_attr(feature = "ts", derive(TS))]
12077#[cfg_attr(feature = "ts", ts(export))]
12078pub struct FOLLOW_TARGET_DATA {
12079    #[doc = "Timestamp (time since system boot)."]
12080    pub timestamp: u64,
12081    #[doc = "button states or switches of a tracker device"]
12082    pub custom_state: u64,
12083    #[doc = "Latitude (WGS84)"]
12084    pub lat: i32,
12085    #[doc = "Longitude (WGS84)"]
12086    pub lon: i32,
12087    #[doc = "Altitude (MSL)"]
12088    pub alt: f32,
12089    #[doc = "target velocity (0,0,0) for unknown"]
12090    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12091    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12092    pub vel: [f32; 3],
12093    #[doc = "linear target acceleration (0,0,0) for unknown"]
12094    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12095    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12096    pub acc: [f32; 3],
12097    #[doc = "(0 0 0 0 for unknown)"]
12098    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12099    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12100    pub attitude_q: [f32; 4],
12101    #[doc = "(0 0 0 for unknown)"]
12102    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12103    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12104    pub rates: [f32; 3],
12105    #[doc = "eph epv"]
12106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12107    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12108    pub position_cov: [f32; 3],
12109    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12110    pub est_capabilities: u8,
12111}
12112impl FOLLOW_TARGET_DATA {
12113    pub const ENCODED_LEN: usize = 93usize;
12114    pub const DEFAULT: Self = Self {
12115        timestamp: 0_u64,
12116        custom_state: 0_u64,
12117        lat: 0_i32,
12118        lon: 0_i32,
12119        alt: 0.0_f32,
12120        vel: [0.0_f32; 3usize],
12121        acc: [0.0_f32; 3usize],
12122        attitude_q: [0.0_f32; 4usize],
12123        rates: [0.0_f32; 3usize],
12124        position_cov: [0.0_f32; 3usize],
12125        est_capabilities: 0_u8,
12126    };
12127    #[cfg(feature = "arbitrary")]
12128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12129        use arbitrary::{Arbitrary, Unstructured};
12130        let mut buf = [0u8; 1024];
12131        rng.fill_bytes(&mut buf);
12132        let mut unstructured = Unstructured::new(&buf);
12133        Self::arbitrary(&mut unstructured).unwrap_or_default()
12134    }
12135}
12136impl Default for FOLLOW_TARGET_DATA {
12137    fn default() -> Self {
12138        Self::DEFAULT.clone()
12139    }
12140}
12141impl MessageData for FOLLOW_TARGET_DATA {
12142    type Message = MavMessage;
12143    const ID: u32 = 144u32;
12144    const NAME: &'static str = "FOLLOW_TARGET";
12145    const EXTRA_CRC: u8 = 127u8;
12146    const ENCODED_LEN: usize = 93usize;
12147    fn deser(
12148        _version: MavlinkVersion,
12149        __input: &[u8],
12150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12151        let avail_len = __input.len();
12152        let mut payload_buf = [0; Self::ENCODED_LEN];
12153        let mut buf = if avail_len < Self::ENCODED_LEN {
12154            payload_buf[0..avail_len].copy_from_slice(__input);
12155            Bytes::new(&payload_buf)
12156        } else {
12157            Bytes::new(__input)
12158        };
12159        let mut __struct = Self::default();
12160        __struct.timestamp = buf.get_u64_le();
12161        __struct.custom_state = buf.get_u64_le();
12162        __struct.lat = buf.get_i32_le();
12163        __struct.lon = buf.get_i32_le();
12164        __struct.alt = buf.get_f32_le();
12165        for v in &mut __struct.vel {
12166            let val = buf.get_f32_le();
12167            *v = val;
12168        }
12169        for v in &mut __struct.acc {
12170            let val = buf.get_f32_le();
12171            *v = val;
12172        }
12173        for v in &mut __struct.attitude_q {
12174            let val = buf.get_f32_le();
12175            *v = val;
12176        }
12177        for v in &mut __struct.rates {
12178            let val = buf.get_f32_le();
12179            *v = val;
12180        }
12181        for v in &mut __struct.position_cov {
12182            let val = buf.get_f32_le();
12183            *v = val;
12184        }
12185        __struct.est_capabilities = buf.get_u8();
12186        Ok(__struct)
12187    }
12188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12189        let mut __tmp = BytesMut::new(bytes);
12190        #[allow(clippy::absurd_extreme_comparisons)]
12191        #[allow(unused_comparisons)]
12192        if __tmp.remaining() < Self::ENCODED_LEN {
12193            panic!(
12194                "buffer is too small (need {} bytes, but got {})",
12195                Self::ENCODED_LEN,
12196                __tmp.remaining(),
12197            )
12198        }
12199        __tmp.put_u64_le(self.timestamp);
12200        __tmp.put_u64_le(self.custom_state);
12201        __tmp.put_i32_le(self.lat);
12202        __tmp.put_i32_le(self.lon);
12203        __tmp.put_f32_le(self.alt);
12204        for val in &self.vel {
12205            __tmp.put_f32_le(*val);
12206        }
12207        for val in &self.acc {
12208            __tmp.put_f32_le(*val);
12209        }
12210        for val in &self.attitude_q {
12211            __tmp.put_f32_le(*val);
12212        }
12213        for val in &self.rates {
12214            __tmp.put_f32_le(*val);
12215        }
12216        for val in &self.position_cov {
12217            __tmp.put_f32_le(*val);
12218        }
12219        __tmp.put_u8(self.est_capabilities);
12220        if matches!(version, MavlinkVersion::V2) {
12221            let len = __tmp.len();
12222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12223        } else {
12224            __tmp.len()
12225        }
12226    }
12227}
12228#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12229#[doc = ""]
12230#[doc = "ID: 371"]
12231#[derive(Debug, Clone, PartialEq)]
12232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12234#[cfg_attr(feature = "ts", derive(TS))]
12235#[cfg_attr(feature = "ts", ts(export))]
12236pub struct FUEL_STATUS_DATA {
12237    #[doc = "Capacity when full. Must be provided."]
12238    pub maximum_fuel: f32,
12239    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12240    pub consumed_fuel: f32,
12241    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12242    pub remaining_fuel: f32,
12243    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12244    pub flow_rate: f32,
12245    #[doc = "Fuel temperature. NaN: field not provided."]
12246    pub temperature: f32,
12247    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12248    pub fuel_type: MavFuelType,
12249    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12250    pub id: u8,
12251    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12252    pub percent_remaining: u8,
12253}
12254impl FUEL_STATUS_DATA {
12255    pub const ENCODED_LEN: usize = 26usize;
12256    pub const DEFAULT: Self = Self {
12257        maximum_fuel: 0.0_f32,
12258        consumed_fuel: 0.0_f32,
12259        remaining_fuel: 0.0_f32,
12260        flow_rate: 0.0_f32,
12261        temperature: 0.0_f32,
12262        fuel_type: MavFuelType::DEFAULT,
12263        id: 0_u8,
12264        percent_remaining: 0_u8,
12265    };
12266    #[cfg(feature = "arbitrary")]
12267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12268        use arbitrary::{Arbitrary, Unstructured};
12269        let mut buf = [0u8; 1024];
12270        rng.fill_bytes(&mut buf);
12271        let mut unstructured = Unstructured::new(&buf);
12272        Self::arbitrary(&mut unstructured).unwrap_or_default()
12273    }
12274}
12275impl Default for FUEL_STATUS_DATA {
12276    fn default() -> Self {
12277        Self::DEFAULT.clone()
12278    }
12279}
12280impl MessageData for FUEL_STATUS_DATA {
12281    type Message = MavMessage;
12282    const ID: u32 = 371u32;
12283    const NAME: &'static str = "FUEL_STATUS";
12284    const EXTRA_CRC: u8 = 10u8;
12285    const ENCODED_LEN: usize = 26usize;
12286    fn deser(
12287        _version: MavlinkVersion,
12288        __input: &[u8],
12289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12290        let avail_len = __input.len();
12291        let mut payload_buf = [0; Self::ENCODED_LEN];
12292        let mut buf = if avail_len < Self::ENCODED_LEN {
12293            payload_buf[0..avail_len].copy_from_slice(__input);
12294            Bytes::new(&payload_buf)
12295        } else {
12296            Bytes::new(__input)
12297        };
12298        let mut __struct = Self::default();
12299        __struct.maximum_fuel = buf.get_f32_le();
12300        __struct.consumed_fuel = buf.get_f32_le();
12301        __struct.remaining_fuel = buf.get_f32_le();
12302        __struct.flow_rate = buf.get_f32_le();
12303        __struct.temperature = buf.get_f32_le();
12304        let tmp = buf.get_u32_le();
12305        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12306            ::mavlink_core::error::ParserError::InvalidEnum {
12307                enum_type: "MavFuelType",
12308                value: tmp as u64,
12309            },
12310        )?;
12311        __struct.id = buf.get_u8();
12312        __struct.percent_remaining = buf.get_u8();
12313        Ok(__struct)
12314    }
12315    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12316        let mut __tmp = BytesMut::new(bytes);
12317        #[allow(clippy::absurd_extreme_comparisons)]
12318        #[allow(unused_comparisons)]
12319        if __tmp.remaining() < Self::ENCODED_LEN {
12320            panic!(
12321                "buffer is too small (need {} bytes, but got {})",
12322                Self::ENCODED_LEN,
12323                __tmp.remaining(),
12324            )
12325        }
12326        __tmp.put_f32_le(self.maximum_fuel);
12327        __tmp.put_f32_le(self.consumed_fuel);
12328        __tmp.put_f32_le(self.remaining_fuel);
12329        __tmp.put_f32_le(self.flow_rate);
12330        __tmp.put_f32_le(self.temperature);
12331        __tmp.put_u32_le(self.fuel_type as u32);
12332        __tmp.put_u8(self.id);
12333        __tmp.put_u8(self.percent_remaining);
12334        if matches!(version, MavlinkVersion::V2) {
12335            let len = __tmp.len();
12336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12337        } else {
12338            __tmp.len()
12339        }
12340    }
12341}
12342#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12343#[doc = ""]
12344#[doc = "ID: 373"]
12345#[derive(Debug, Clone, PartialEq)]
12346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12348#[cfg_attr(feature = "ts", derive(TS))]
12349#[cfg_attr(feature = "ts", ts(export))]
12350pub struct GENERATOR_STATUS_DATA {
12351    #[doc = "Status flags."]
12352    pub status: MavGeneratorStatusFlag,
12353    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12354    pub battery_current: f32,
12355    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12356    pub load_current: f32,
12357    #[doc = "The power being generated. NaN: field not provided"]
12358    pub power_generated: f32,
12359    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12360    pub bus_voltage: f32,
12361    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12362    pub bat_current_setpoint: f32,
12363    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12364    pub runtime: u32,
12365    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12366    pub time_until_maintenance: i32,
12367    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12368    pub generator_speed: u16,
12369    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12370    pub rectifier_temperature: i16,
12371    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12372    pub generator_temperature: i16,
12373}
12374impl GENERATOR_STATUS_DATA {
12375    pub const ENCODED_LEN: usize = 42usize;
12376    pub const DEFAULT: Self = Self {
12377        status: MavGeneratorStatusFlag::DEFAULT,
12378        battery_current: 0.0_f32,
12379        load_current: 0.0_f32,
12380        power_generated: 0.0_f32,
12381        bus_voltage: 0.0_f32,
12382        bat_current_setpoint: 0.0_f32,
12383        runtime: 0_u32,
12384        time_until_maintenance: 0_i32,
12385        generator_speed: 0_u16,
12386        rectifier_temperature: 0_i16,
12387        generator_temperature: 0_i16,
12388    };
12389    #[cfg(feature = "arbitrary")]
12390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12391        use arbitrary::{Arbitrary, Unstructured};
12392        let mut buf = [0u8; 1024];
12393        rng.fill_bytes(&mut buf);
12394        let mut unstructured = Unstructured::new(&buf);
12395        Self::arbitrary(&mut unstructured).unwrap_or_default()
12396    }
12397}
12398impl Default for GENERATOR_STATUS_DATA {
12399    fn default() -> Self {
12400        Self::DEFAULT.clone()
12401    }
12402}
12403impl MessageData for GENERATOR_STATUS_DATA {
12404    type Message = MavMessage;
12405    const ID: u32 = 373u32;
12406    const NAME: &'static str = "GENERATOR_STATUS";
12407    const EXTRA_CRC: u8 = 117u8;
12408    const ENCODED_LEN: usize = 42usize;
12409    fn deser(
12410        _version: MavlinkVersion,
12411        __input: &[u8],
12412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12413        let avail_len = __input.len();
12414        let mut payload_buf = [0; Self::ENCODED_LEN];
12415        let mut buf = if avail_len < Self::ENCODED_LEN {
12416            payload_buf[0..avail_len].copy_from_slice(__input);
12417            Bytes::new(&payload_buf)
12418        } else {
12419            Bytes::new(__input)
12420        };
12421        let mut __struct = Self::default();
12422        let tmp = buf.get_u64_le();
12423        __struct.status = MavGeneratorStatusFlag::from_bits(tmp).ok_or(
12424            ::mavlink_core::error::ParserError::InvalidFlag {
12425                flag_type: "MavGeneratorStatusFlag",
12426                value: tmp as u64,
12427            },
12428        )?;
12429        __struct.battery_current = buf.get_f32_le();
12430        __struct.load_current = buf.get_f32_le();
12431        __struct.power_generated = buf.get_f32_le();
12432        __struct.bus_voltage = buf.get_f32_le();
12433        __struct.bat_current_setpoint = buf.get_f32_le();
12434        __struct.runtime = buf.get_u32_le();
12435        __struct.time_until_maintenance = buf.get_i32_le();
12436        __struct.generator_speed = buf.get_u16_le();
12437        __struct.rectifier_temperature = buf.get_i16_le();
12438        __struct.generator_temperature = buf.get_i16_le();
12439        Ok(__struct)
12440    }
12441    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12442        let mut __tmp = BytesMut::new(bytes);
12443        #[allow(clippy::absurd_extreme_comparisons)]
12444        #[allow(unused_comparisons)]
12445        if __tmp.remaining() < Self::ENCODED_LEN {
12446            panic!(
12447                "buffer is too small (need {} bytes, but got {})",
12448                Self::ENCODED_LEN,
12449                __tmp.remaining(),
12450            )
12451        }
12452        __tmp.put_u64_le(self.status.bits());
12453        __tmp.put_f32_le(self.battery_current);
12454        __tmp.put_f32_le(self.load_current);
12455        __tmp.put_f32_le(self.power_generated);
12456        __tmp.put_f32_le(self.bus_voltage);
12457        __tmp.put_f32_le(self.bat_current_setpoint);
12458        __tmp.put_u32_le(self.runtime);
12459        __tmp.put_i32_le(self.time_until_maintenance);
12460        __tmp.put_u16_le(self.generator_speed);
12461        __tmp.put_i16_le(self.rectifier_temperature);
12462        __tmp.put_i16_le(self.generator_temperature);
12463        if matches!(version, MavlinkVersion::V2) {
12464            let len = __tmp.len();
12465            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12466        } else {
12467            __tmp.len()
12468        }
12469    }
12470}
12471#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12472#[doc = ""]
12473#[doc = "ID: 285"]
12474#[derive(Debug, Clone, PartialEq)]
12475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12477#[cfg_attr(feature = "ts", derive(TS))]
12478#[cfg_attr(feature = "ts", ts(export))]
12479pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12480    #[doc = "Timestamp (time since system boot)."]
12481    pub time_boot_ms: u32,
12482    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12485    pub q: [f32; 4],
12486    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12487    pub angular_velocity_x: f32,
12488    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12489    pub angular_velocity_y: f32,
12490    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12491    pub angular_velocity_z: f32,
12492    #[doc = "Failure flags (0 for no failure)"]
12493    pub failure_flags: GimbalDeviceErrorFlags,
12494    #[doc = "Current gimbal flags set."]
12495    pub flags: GimbalDeviceFlags,
12496    #[doc = "System ID"]
12497    pub target_system: u8,
12498    #[doc = "Component ID"]
12499    pub target_component: u8,
12500    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12501    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12502    pub delta_yaw: f32,
12503    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12504    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12505    pub delta_yaw_velocity: f32,
12506    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12507    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12508    pub gimbal_device_id: u8,
12509}
12510impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12511    pub const ENCODED_LEN: usize = 49usize;
12512    pub const DEFAULT: Self = Self {
12513        time_boot_ms: 0_u32,
12514        q: [0.0_f32; 4usize],
12515        angular_velocity_x: 0.0_f32,
12516        angular_velocity_y: 0.0_f32,
12517        angular_velocity_z: 0.0_f32,
12518        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12519        flags: GimbalDeviceFlags::DEFAULT,
12520        target_system: 0_u8,
12521        target_component: 0_u8,
12522        delta_yaw: 0.0_f32,
12523        delta_yaw_velocity: 0.0_f32,
12524        gimbal_device_id: 0_u8,
12525    };
12526    #[cfg(feature = "arbitrary")]
12527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12528        use arbitrary::{Arbitrary, Unstructured};
12529        let mut buf = [0u8; 1024];
12530        rng.fill_bytes(&mut buf);
12531        let mut unstructured = Unstructured::new(&buf);
12532        Self::arbitrary(&mut unstructured).unwrap_or_default()
12533    }
12534}
12535impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12536    fn default() -> Self {
12537        Self::DEFAULT.clone()
12538    }
12539}
12540impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12541    type Message = MavMessage;
12542    const ID: u32 = 285u32;
12543    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12544    const EXTRA_CRC: u8 = 137u8;
12545    const ENCODED_LEN: usize = 49usize;
12546    fn deser(
12547        _version: MavlinkVersion,
12548        __input: &[u8],
12549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12550        let avail_len = __input.len();
12551        let mut payload_buf = [0; Self::ENCODED_LEN];
12552        let mut buf = if avail_len < Self::ENCODED_LEN {
12553            payload_buf[0..avail_len].copy_from_slice(__input);
12554            Bytes::new(&payload_buf)
12555        } else {
12556            Bytes::new(__input)
12557        };
12558        let mut __struct = Self::default();
12559        __struct.time_boot_ms = buf.get_u32_le();
12560        for v in &mut __struct.q {
12561            let val = buf.get_f32_le();
12562            *v = val;
12563        }
12564        __struct.angular_velocity_x = buf.get_f32_le();
12565        __struct.angular_velocity_y = buf.get_f32_le();
12566        __struct.angular_velocity_z = buf.get_f32_le();
12567        let tmp = buf.get_u32_le();
12568        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(tmp).ok_or(
12569            ::mavlink_core::error::ParserError::InvalidFlag {
12570                flag_type: "GimbalDeviceErrorFlags",
12571                value: tmp as u64,
12572            },
12573        )?;
12574        let tmp = buf.get_u16_le();
12575        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
12576            ::mavlink_core::error::ParserError::InvalidFlag {
12577                flag_type: "GimbalDeviceFlags",
12578                value: tmp as u64,
12579            },
12580        )?;
12581        __struct.target_system = buf.get_u8();
12582        __struct.target_component = buf.get_u8();
12583        __struct.delta_yaw = buf.get_f32_le();
12584        __struct.delta_yaw_velocity = buf.get_f32_le();
12585        __struct.gimbal_device_id = buf.get_u8();
12586        Ok(__struct)
12587    }
12588    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12589        let mut __tmp = BytesMut::new(bytes);
12590        #[allow(clippy::absurd_extreme_comparisons)]
12591        #[allow(unused_comparisons)]
12592        if __tmp.remaining() < Self::ENCODED_LEN {
12593            panic!(
12594                "buffer is too small (need {} bytes, but got {})",
12595                Self::ENCODED_LEN,
12596                __tmp.remaining(),
12597            )
12598        }
12599        __tmp.put_u32_le(self.time_boot_ms);
12600        for val in &self.q {
12601            __tmp.put_f32_le(*val);
12602        }
12603        __tmp.put_f32_le(self.angular_velocity_x);
12604        __tmp.put_f32_le(self.angular_velocity_y);
12605        __tmp.put_f32_le(self.angular_velocity_z);
12606        __tmp.put_u32_le(self.failure_flags.bits());
12607        __tmp.put_u16_le(self.flags.bits());
12608        __tmp.put_u8(self.target_system);
12609        __tmp.put_u8(self.target_component);
12610        if matches!(version, MavlinkVersion::V2) {
12611            __tmp.put_f32_le(self.delta_yaw);
12612            __tmp.put_f32_le(self.delta_yaw_velocity);
12613            __tmp.put_u8(self.gimbal_device_id);
12614            let len = __tmp.len();
12615            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12616        } else {
12617            __tmp.len()
12618        }
12619    }
12620}
12621#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12622#[doc = ""]
12623#[doc = "ID: 283"]
12624#[derive(Debug, Clone, PartialEq)]
12625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12627#[cfg_attr(feature = "ts", derive(TS))]
12628#[cfg_attr(feature = "ts", ts(export))]
12629pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12630    #[doc = "UID of gimbal hardware (0 if unknown)."]
12631    pub uid: u64,
12632    #[doc = "Timestamp (time since system boot)."]
12633    pub time_boot_ms: u32,
12634    #[doc = "0xff)."]
12635    pub firmware_version: u32,
12636    #[doc = "0xff)."]
12637    pub hardware_version: u32,
12638    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12639    pub roll_min: f32,
12640    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12641    pub roll_max: f32,
12642    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12643    pub pitch_min: f32,
12644    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12645    pub pitch_max: f32,
12646    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12647    pub yaw_min: f32,
12648    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12649    pub yaw_max: f32,
12650    #[doc = "Bitmap of gimbal capability flags."]
12651    pub cap_flags: GimbalDeviceCapFlags,
12652    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12653    pub custom_cap_flags: u16,
12654    #[doc = "Name of the gimbal vendor."]
12655    #[cfg_attr(feature = "ts", ts(type = "string"))]
12656    pub vendor_name: CharArray<32>,
12657    #[doc = "Name of the gimbal model."]
12658    #[cfg_attr(feature = "ts", ts(type = "string"))]
12659    pub model_name: CharArray<32>,
12660    #[doc = "Custom name of the gimbal given to it by the user."]
12661    #[cfg_attr(feature = "ts", ts(type = "string"))]
12662    pub custom_name: CharArray<32>,
12663    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12664    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12665    pub gimbal_device_id: u8,
12666}
12667impl GIMBAL_DEVICE_INFORMATION_DATA {
12668    pub const ENCODED_LEN: usize = 145usize;
12669    pub const DEFAULT: Self = Self {
12670        uid: 0_u64,
12671        time_boot_ms: 0_u32,
12672        firmware_version: 0_u32,
12673        hardware_version: 0_u32,
12674        roll_min: 0.0_f32,
12675        roll_max: 0.0_f32,
12676        pitch_min: 0.0_f32,
12677        pitch_max: 0.0_f32,
12678        yaw_min: 0.0_f32,
12679        yaw_max: 0.0_f32,
12680        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12681        custom_cap_flags: 0_u16,
12682        vendor_name: CharArray::new([0_u8; 32usize]),
12683        model_name: CharArray::new([0_u8; 32usize]),
12684        custom_name: CharArray::new([0_u8; 32usize]),
12685        gimbal_device_id: 0_u8,
12686    };
12687    #[cfg(feature = "arbitrary")]
12688    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12689        use arbitrary::{Arbitrary, Unstructured};
12690        let mut buf = [0u8; 1024];
12691        rng.fill_bytes(&mut buf);
12692        let mut unstructured = Unstructured::new(&buf);
12693        Self::arbitrary(&mut unstructured).unwrap_or_default()
12694    }
12695}
12696impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12697    fn default() -> Self {
12698        Self::DEFAULT.clone()
12699    }
12700}
12701impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12702    type Message = MavMessage;
12703    const ID: u32 = 283u32;
12704    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12705    const EXTRA_CRC: u8 = 74u8;
12706    const ENCODED_LEN: usize = 145usize;
12707    fn deser(
12708        _version: MavlinkVersion,
12709        __input: &[u8],
12710    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12711        let avail_len = __input.len();
12712        let mut payload_buf = [0; Self::ENCODED_LEN];
12713        let mut buf = if avail_len < Self::ENCODED_LEN {
12714            payload_buf[0..avail_len].copy_from_slice(__input);
12715            Bytes::new(&payload_buf)
12716        } else {
12717            Bytes::new(__input)
12718        };
12719        let mut __struct = Self::default();
12720        __struct.uid = buf.get_u64_le();
12721        __struct.time_boot_ms = buf.get_u32_le();
12722        __struct.firmware_version = buf.get_u32_le();
12723        __struct.hardware_version = buf.get_u32_le();
12724        __struct.roll_min = buf.get_f32_le();
12725        __struct.roll_max = buf.get_f32_le();
12726        __struct.pitch_min = buf.get_f32_le();
12727        __struct.pitch_max = buf.get_f32_le();
12728        __struct.yaw_min = buf.get_f32_le();
12729        __struct.yaw_max = buf.get_f32_le();
12730        let tmp = buf.get_u16_le();
12731        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(tmp).ok_or(
12732            ::mavlink_core::error::ParserError::InvalidFlag {
12733                flag_type: "GimbalDeviceCapFlags",
12734                value: tmp as u64,
12735            },
12736        )?;
12737        __struct.custom_cap_flags = buf.get_u16_le();
12738        let mut tmp = [0_u8; 32usize];
12739        for v in &mut tmp {
12740            *v = buf.get_u8();
12741        }
12742        __struct.vendor_name = CharArray::new(tmp);
12743        let mut tmp = [0_u8; 32usize];
12744        for v in &mut tmp {
12745            *v = buf.get_u8();
12746        }
12747        __struct.model_name = CharArray::new(tmp);
12748        let mut tmp = [0_u8; 32usize];
12749        for v in &mut tmp {
12750            *v = buf.get_u8();
12751        }
12752        __struct.custom_name = CharArray::new(tmp);
12753        __struct.gimbal_device_id = buf.get_u8();
12754        Ok(__struct)
12755    }
12756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12757        let mut __tmp = BytesMut::new(bytes);
12758        #[allow(clippy::absurd_extreme_comparisons)]
12759        #[allow(unused_comparisons)]
12760        if __tmp.remaining() < Self::ENCODED_LEN {
12761            panic!(
12762                "buffer is too small (need {} bytes, but got {})",
12763                Self::ENCODED_LEN,
12764                __tmp.remaining(),
12765            )
12766        }
12767        __tmp.put_u64_le(self.uid);
12768        __tmp.put_u32_le(self.time_boot_ms);
12769        __tmp.put_u32_le(self.firmware_version);
12770        __tmp.put_u32_le(self.hardware_version);
12771        __tmp.put_f32_le(self.roll_min);
12772        __tmp.put_f32_le(self.roll_max);
12773        __tmp.put_f32_le(self.pitch_min);
12774        __tmp.put_f32_le(self.pitch_max);
12775        __tmp.put_f32_le(self.yaw_min);
12776        __tmp.put_f32_le(self.yaw_max);
12777        __tmp.put_u16_le(self.cap_flags.bits());
12778        __tmp.put_u16_le(self.custom_cap_flags);
12779        for val in &self.vendor_name {
12780            __tmp.put_u8(*val);
12781        }
12782        for val in &self.model_name {
12783            __tmp.put_u8(*val);
12784        }
12785        for val in &self.custom_name {
12786            __tmp.put_u8(*val);
12787        }
12788        if matches!(version, MavlinkVersion::V2) {
12789            __tmp.put_u8(self.gimbal_device_id);
12790            let len = __tmp.len();
12791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12792        } else {
12793            __tmp.len()
12794        }
12795    }
12796}
12797#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12798#[doc = ""]
12799#[doc = "ID: 284"]
12800#[derive(Debug, Clone, PartialEq)]
12801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12803#[cfg_attr(feature = "ts", derive(TS))]
12804#[cfg_attr(feature = "ts", ts(export))]
12805pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12806    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12807    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12808    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12809    pub q: [f32; 4],
12810    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12811    pub angular_velocity_x: f32,
12812    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12813    pub angular_velocity_y: f32,
12814    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12815    pub angular_velocity_z: f32,
12816    #[doc = "Low level gimbal flags."]
12817    pub flags: GimbalDeviceFlags,
12818    #[doc = "System ID"]
12819    pub target_system: u8,
12820    #[doc = "Component ID"]
12821    pub target_component: u8,
12822}
12823impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12824    pub const ENCODED_LEN: usize = 32usize;
12825    pub const DEFAULT: Self = Self {
12826        q: [0.0_f32; 4usize],
12827        angular_velocity_x: 0.0_f32,
12828        angular_velocity_y: 0.0_f32,
12829        angular_velocity_z: 0.0_f32,
12830        flags: GimbalDeviceFlags::DEFAULT,
12831        target_system: 0_u8,
12832        target_component: 0_u8,
12833    };
12834    #[cfg(feature = "arbitrary")]
12835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12836        use arbitrary::{Arbitrary, Unstructured};
12837        let mut buf = [0u8; 1024];
12838        rng.fill_bytes(&mut buf);
12839        let mut unstructured = Unstructured::new(&buf);
12840        Self::arbitrary(&mut unstructured).unwrap_or_default()
12841    }
12842}
12843impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12844    fn default() -> Self {
12845        Self::DEFAULT.clone()
12846    }
12847}
12848impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12849    type Message = MavMessage;
12850    const ID: u32 = 284u32;
12851    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12852    const EXTRA_CRC: u8 = 99u8;
12853    const ENCODED_LEN: usize = 32usize;
12854    fn deser(
12855        _version: MavlinkVersion,
12856        __input: &[u8],
12857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12858        let avail_len = __input.len();
12859        let mut payload_buf = [0; Self::ENCODED_LEN];
12860        let mut buf = if avail_len < Self::ENCODED_LEN {
12861            payload_buf[0..avail_len].copy_from_slice(__input);
12862            Bytes::new(&payload_buf)
12863        } else {
12864            Bytes::new(__input)
12865        };
12866        let mut __struct = Self::default();
12867        for v in &mut __struct.q {
12868            let val = buf.get_f32_le();
12869            *v = val;
12870        }
12871        __struct.angular_velocity_x = buf.get_f32_le();
12872        __struct.angular_velocity_y = buf.get_f32_le();
12873        __struct.angular_velocity_z = buf.get_f32_le();
12874        let tmp = buf.get_u16_le();
12875        __struct.flags = GimbalDeviceFlags::from_bits(tmp).ok_or(
12876            ::mavlink_core::error::ParserError::InvalidFlag {
12877                flag_type: "GimbalDeviceFlags",
12878                value: tmp as u64,
12879            },
12880        )?;
12881        __struct.target_system = buf.get_u8();
12882        __struct.target_component = buf.get_u8();
12883        Ok(__struct)
12884    }
12885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12886        let mut __tmp = BytesMut::new(bytes);
12887        #[allow(clippy::absurd_extreme_comparisons)]
12888        #[allow(unused_comparisons)]
12889        if __tmp.remaining() < Self::ENCODED_LEN {
12890            panic!(
12891                "buffer is too small (need {} bytes, but got {})",
12892                Self::ENCODED_LEN,
12893                __tmp.remaining(),
12894            )
12895        }
12896        for val in &self.q {
12897            __tmp.put_f32_le(*val);
12898        }
12899        __tmp.put_f32_le(self.angular_velocity_x);
12900        __tmp.put_f32_le(self.angular_velocity_y);
12901        __tmp.put_f32_le(self.angular_velocity_z);
12902        __tmp.put_u16_le(self.flags.bits());
12903        __tmp.put_u8(self.target_system);
12904        __tmp.put_u8(self.target_component);
12905        if matches!(version, MavlinkVersion::V2) {
12906            let len = __tmp.len();
12907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12908        } else {
12909            __tmp.len()
12910        }
12911    }
12912}
12913#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12914#[doc = ""]
12915#[doc = "ID: 280"]
12916#[derive(Debug, Clone, PartialEq)]
12917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12919#[cfg_attr(feature = "ts", derive(TS))]
12920#[cfg_attr(feature = "ts", ts(export))]
12921pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12922    #[doc = "Timestamp (time since system boot)."]
12923    pub time_boot_ms: u32,
12924    #[doc = "Bitmap of gimbal capability flags."]
12925    pub cap_flags: GimbalManagerCapFlags,
12926    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12927    pub roll_min: f32,
12928    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12929    pub roll_max: f32,
12930    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12931    pub pitch_min: f32,
12932    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12933    pub pitch_max: f32,
12934    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12935    pub yaw_min: f32,
12936    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12937    pub yaw_max: f32,
12938    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12939    pub gimbal_device_id: u8,
12940}
12941impl GIMBAL_MANAGER_INFORMATION_DATA {
12942    pub const ENCODED_LEN: usize = 33usize;
12943    pub const DEFAULT: Self = Self {
12944        time_boot_ms: 0_u32,
12945        cap_flags: GimbalManagerCapFlags::DEFAULT,
12946        roll_min: 0.0_f32,
12947        roll_max: 0.0_f32,
12948        pitch_min: 0.0_f32,
12949        pitch_max: 0.0_f32,
12950        yaw_min: 0.0_f32,
12951        yaw_max: 0.0_f32,
12952        gimbal_device_id: 0_u8,
12953    };
12954    #[cfg(feature = "arbitrary")]
12955    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12956        use arbitrary::{Arbitrary, Unstructured};
12957        let mut buf = [0u8; 1024];
12958        rng.fill_bytes(&mut buf);
12959        let mut unstructured = Unstructured::new(&buf);
12960        Self::arbitrary(&mut unstructured).unwrap_or_default()
12961    }
12962}
12963impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12964    fn default() -> Self {
12965        Self::DEFAULT.clone()
12966    }
12967}
12968impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12969    type Message = MavMessage;
12970    const ID: u32 = 280u32;
12971    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12972    const EXTRA_CRC: u8 = 70u8;
12973    const ENCODED_LEN: usize = 33usize;
12974    fn deser(
12975        _version: MavlinkVersion,
12976        __input: &[u8],
12977    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12978        let avail_len = __input.len();
12979        let mut payload_buf = [0; Self::ENCODED_LEN];
12980        let mut buf = if avail_len < Self::ENCODED_LEN {
12981            payload_buf[0..avail_len].copy_from_slice(__input);
12982            Bytes::new(&payload_buf)
12983        } else {
12984            Bytes::new(__input)
12985        };
12986        let mut __struct = Self::default();
12987        __struct.time_boot_ms = buf.get_u32_le();
12988        let tmp = buf.get_u32_le();
12989        __struct.cap_flags = GimbalManagerCapFlags::from_bits(tmp).ok_or(
12990            ::mavlink_core::error::ParserError::InvalidFlag {
12991                flag_type: "GimbalManagerCapFlags",
12992                value: tmp as u64,
12993            },
12994        )?;
12995        __struct.roll_min = buf.get_f32_le();
12996        __struct.roll_max = buf.get_f32_le();
12997        __struct.pitch_min = buf.get_f32_le();
12998        __struct.pitch_max = buf.get_f32_le();
12999        __struct.yaw_min = buf.get_f32_le();
13000        __struct.yaw_max = buf.get_f32_le();
13001        __struct.gimbal_device_id = buf.get_u8();
13002        Ok(__struct)
13003    }
13004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13005        let mut __tmp = BytesMut::new(bytes);
13006        #[allow(clippy::absurd_extreme_comparisons)]
13007        #[allow(unused_comparisons)]
13008        if __tmp.remaining() < Self::ENCODED_LEN {
13009            panic!(
13010                "buffer is too small (need {} bytes, but got {})",
13011                Self::ENCODED_LEN,
13012                __tmp.remaining(),
13013            )
13014        }
13015        __tmp.put_u32_le(self.time_boot_ms);
13016        __tmp.put_u32_le(self.cap_flags.bits());
13017        __tmp.put_f32_le(self.roll_min);
13018        __tmp.put_f32_le(self.roll_max);
13019        __tmp.put_f32_le(self.pitch_min);
13020        __tmp.put_f32_le(self.pitch_max);
13021        __tmp.put_f32_le(self.yaw_min);
13022        __tmp.put_f32_le(self.yaw_max);
13023        __tmp.put_u8(self.gimbal_device_id);
13024        if matches!(version, MavlinkVersion::V2) {
13025            let len = __tmp.len();
13026            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13027        } else {
13028            __tmp.len()
13029        }
13030    }
13031}
13032#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13033#[doc = ""]
13034#[doc = "ID: 282"]
13035#[derive(Debug, Clone, PartialEq)]
13036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13038#[cfg_attr(feature = "ts", derive(TS))]
13039#[cfg_attr(feature = "ts", ts(export))]
13040pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13041    #[doc = "High level gimbal manager flags to use."]
13042    pub flags: GimbalManagerFlags,
13043    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13044    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13045    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13046    pub q: [f32; 4],
13047    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13048    pub angular_velocity_x: f32,
13049    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13050    pub angular_velocity_y: f32,
13051    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13052    pub angular_velocity_z: f32,
13053    #[doc = "System ID"]
13054    pub target_system: u8,
13055    #[doc = "Component ID"]
13056    pub target_component: u8,
13057    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13058    pub gimbal_device_id: u8,
13059}
13060impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13061    pub const ENCODED_LEN: usize = 35usize;
13062    pub const DEFAULT: Self = Self {
13063        flags: GimbalManagerFlags::DEFAULT,
13064        q: [0.0_f32; 4usize],
13065        angular_velocity_x: 0.0_f32,
13066        angular_velocity_y: 0.0_f32,
13067        angular_velocity_z: 0.0_f32,
13068        target_system: 0_u8,
13069        target_component: 0_u8,
13070        gimbal_device_id: 0_u8,
13071    };
13072    #[cfg(feature = "arbitrary")]
13073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13074        use arbitrary::{Arbitrary, Unstructured};
13075        let mut buf = [0u8; 1024];
13076        rng.fill_bytes(&mut buf);
13077        let mut unstructured = Unstructured::new(&buf);
13078        Self::arbitrary(&mut unstructured).unwrap_or_default()
13079    }
13080}
13081impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13082    fn default() -> Self {
13083        Self::DEFAULT.clone()
13084    }
13085}
13086impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13087    type Message = MavMessage;
13088    const ID: u32 = 282u32;
13089    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13090    const EXTRA_CRC: u8 = 123u8;
13091    const ENCODED_LEN: usize = 35usize;
13092    fn deser(
13093        _version: MavlinkVersion,
13094        __input: &[u8],
13095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13096        let avail_len = __input.len();
13097        let mut payload_buf = [0; Self::ENCODED_LEN];
13098        let mut buf = if avail_len < Self::ENCODED_LEN {
13099            payload_buf[0..avail_len].copy_from_slice(__input);
13100            Bytes::new(&payload_buf)
13101        } else {
13102            Bytes::new(__input)
13103        };
13104        let mut __struct = Self::default();
13105        let tmp = buf.get_u32_le();
13106        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13107            ::mavlink_core::error::ParserError::InvalidFlag {
13108                flag_type: "GimbalManagerFlags",
13109                value: tmp as u64,
13110            },
13111        )?;
13112        for v in &mut __struct.q {
13113            let val = buf.get_f32_le();
13114            *v = val;
13115        }
13116        __struct.angular_velocity_x = buf.get_f32_le();
13117        __struct.angular_velocity_y = buf.get_f32_le();
13118        __struct.angular_velocity_z = buf.get_f32_le();
13119        __struct.target_system = buf.get_u8();
13120        __struct.target_component = buf.get_u8();
13121        __struct.gimbal_device_id = buf.get_u8();
13122        Ok(__struct)
13123    }
13124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13125        let mut __tmp = BytesMut::new(bytes);
13126        #[allow(clippy::absurd_extreme_comparisons)]
13127        #[allow(unused_comparisons)]
13128        if __tmp.remaining() < Self::ENCODED_LEN {
13129            panic!(
13130                "buffer is too small (need {} bytes, but got {})",
13131                Self::ENCODED_LEN,
13132                __tmp.remaining(),
13133            )
13134        }
13135        __tmp.put_u32_le(self.flags.bits());
13136        for val in &self.q {
13137            __tmp.put_f32_le(*val);
13138        }
13139        __tmp.put_f32_le(self.angular_velocity_x);
13140        __tmp.put_f32_le(self.angular_velocity_y);
13141        __tmp.put_f32_le(self.angular_velocity_z);
13142        __tmp.put_u8(self.target_system);
13143        __tmp.put_u8(self.target_component);
13144        __tmp.put_u8(self.gimbal_device_id);
13145        if matches!(version, MavlinkVersion::V2) {
13146            let len = __tmp.len();
13147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13148        } else {
13149            __tmp.len()
13150        }
13151    }
13152}
13153#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13154#[doc = ""]
13155#[doc = "ID: 288"]
13156#[derive(Debug, Clone, PartialEq)]
13157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13159#[cfg_attr(feature = "ts", derive(TS))]
13160#[cfg_attr(feature = "ts", ts(export))]
13161pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13162    #[doc = "High level gimbal manager flags."]
13163    pub flags: GimbalManagerFlags,
13164    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13165    pub pitch: f32,
13166    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13167    pub yaw: f32,
13168    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13169    pub pitch_rate: f32,
13170    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13171    pub yaw_rate: f32,
13172    #[doc = "System ID"]
13173    pub target_system: u8,
13174    #[doc = "Component ID"]
13175    pub target_component: u8,
13176    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13177    pub gimbal_device_id: u8,
13178}
13179impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13180    pub const ENCODED_LEN: usize = 23usize;
13181    pub const DEFAULT: Self = Self {
13182        flags: GimbalManagerFlags::DEFAULT,
13183        pitch: 0.0_f32,
13184        yaw: 0.0_f32,
13185        pitch_rate: 0.0_f32,
13186        yaw_rate: 0.0_f32,
13187        target_system: 0_u8,
13188        target_component: 0_u8,
13189        gimbal_device_id: 0_u8,
13190    };
13191    #[cfg(feature = "arbitrary")]
13192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13193        use arbitrary::{Arbitrary, Unstructured};
13194        let mut buf = [0u8; 1024];
13195        rng.fill_bytes(&mut buf);
13196        let mut unstructured = Unstructured::new(&buf);
13197        Self::arbitrary(&mut unstructured).unwrap_or_default()
13198    }
13199}
13200impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13201    fn default() -> Self {
13202        Self::DEFAULT.clone()
13203    }
13204}
13205impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13206    type Message = MavMessage;
13207    const ID: u32 = 288u32;
13208    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13209    const EXTRA_CRC: u8 = 20u8;
13210    const ENCODED_LEN: usize = 23usize;
13211    fn deser(
13212        _version: MavlinkVersion,
13213        __input: &[u8],
13214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13215        let avail_len = __input.len();
13216        let mut payload_buf = [0; Self::ENCODED_LEN];
13217        let mut buf = if avail_len < Self::ENCODED_LEN {
13218            payload_buf[0..avail_len].copy_from_slice(__input);
13219            Bytes::new(&payload_buf)
13220        } else {
13221            Bytes::new(__input)
13222        };
13223        let mut __struct = Self::default();
13224        let tmp = buf.get_u32_le();
13225        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13226            ::mavlink_core::error::ParserError::InvalidFlag {
13227                flag_type: "GimbalManagerFlags",
13228                value: tmp as u64,
13229            },
13230        )?;
13231        __struct.pitch = buf.get_f32_le();
13232        __struct.yaw = buf.get_f32_le();
13233        __struct.pitch_rate = buf.get_f32_le();
13234        __struct.yaw_rate = buf.get_f32_le();
13235        __struct.target_system = buf.get_u8();
13236        __struct.target_component = buf.get_u8();
13237        __struct.gimbal_device_id = buf.get_u8();
13238        Ok(__struct)
13239    }
13240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13241        let mut __tmp = BytesMut::new(bytes);
13242        #[allow(clippy::absurd_extreme_comparisons)]
13243        #[allow(unused_comparisons)]
13244        if __tmp.remaining() < Self::ENCODED_LEN {
13245            panic!(
13246                "buffer is too small (need {} bytes, but got {})",
13247                Self::ENCODED_LEN,
13248                __tmp.remaining(),
13249            )
13250        }
13251        __tmp.put_u32_le(self.flags.bits());
13252        __tmp.put_f32_le(self.pitch);
13253        __tmp.put_f32_le(self.yaw);
13254        __tmp.put_f32_le(self.pitch_rate);
13255        __tmp.put_f32_le(self.yaw_rate);
13256        __tmp.put_u8(self.target_system);
13257        __tmp.put_u8(self.target_component);
13258        __tmp.put_u8(self.gimbal_device_id);
13259        if matches!(version, MavlinkVersion::V2) {
13260            let len = __tmp.len();
13261            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13262        } else {
13263            __tmp.len()
13264        }
13265    }
13266}
13267#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13268#[doc = ""]
13269#[doc = "ID: 287"]
13270#[derive(Debug, Clone, PartialEq)]
13271#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13273#[cfg_attr(feature = "ts", derive(TS))]
13274#[cfg_attr(feature = "ts", ts(export))]
13275pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13276    #[doc = "High level gimbal manager flags to use."]
13277    pub flags: GimbalManagerFlags,
13278    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13279    pub pitch: f32,
13280    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13281    pub yaw: f32,
13282    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13283    pub pitch_rate: f32,
13284    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13285    pub yaw_rate: f32,
13286    #[doc = "System ID"]
13287    pub target_system: u8,
13288    #[doc = "Component ID"]
13289    pub target_component: u8,
13290    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13291    pub gimbal_device_id: u8,
13292}
13293impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13294    pub const ENCODED_LEN: usize = 23usize;
13295    pub const DEFAULT: Self = Self {
13296        flags: GimbalManagerFlags::DEFAULT,
13297        pitch: 0.0_f32,
13298        yaw: 0.0_f32,
13299        pitch_rate: 0.0_f32,
13300        yaw_rate: 0.0_f32,
13301        target_system: 0_u8,
13302        target_component: 0_u8,
13303        gimbal_device_id: 0_u8,
13304    };
13305    #[cfg(feature = "arbitrary")]
13306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13307        use arbitrary::{Arbitrary, Unstructured};
13308        let mut buf = [0u8; 1024];
13309        rng.fill_bytes(&mut buf);
13310        let mut unstructured = Unstructured::new(&buf);
13311        Self::arbitrary(&mut unstructured).unwrap_or_default()
13312    }
13313}
13314impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13315    fn default() -> Self {
13316        Self::DEFAULT.clone()
13317    }
13318}
13319impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13320    type Message = MavMessage;
13321    const ID: u32 = 287u32;
13322    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13323    const EXTRA_CRC: u8 = 1u8;
13324    const ENCODED_LEN: usize = 23usize;
13325    fn deser(
13326        _version: MavlinkVersion,
13327        __input: &[u8],
13328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13329        let avail_len = __input.len();
13330        let mut payload_buf = [0; Self::ENCODED_LEN];
13331        let mut buf = if avail_len < Self::ENCODED_LEN {
13332            payload_buf[0..avail_len].copy_from_slice(__input);
13333            Bytes::new(&payload_buf)
13334        } else {
13335            Bytes::new(__input)
13336        };
13337        let mut __struct = Self::default();
13338        let tmp = buf.get_u32_le();
13339        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13340            ::mavlink_core::error::ParserError::InvalidFlag {
13341                flag_type: "GimbalManagerFlags",
13342                value: tmp as u64,
13343            },
13344        )?;
13345        __struct.pitch = buf.get_f32_le();
13346        __struct.yaw = buf.get_f32_le();
13347        __struct.pitch_rate = buf.get_f32_le();
13348        __struct.yaw_rate = buf.get_f32_le();
13349        __struct.target_system = buf.get_u8();
13350        __struct.target_component = buf.get_u8();
13351        __struct.gimbal_device_id = buf.get_u8();
13352        Ok(__struct)
13353    }
13354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13355        let mut __tmp = BytesMut::new(bytes);
13356        #[allow(clippy::absurd_extreme_comparisons)]
13357        #[allow(unused_comparisons)]
13358        if __tmp.remaining() < Self::ENCODED_LEN {
13359            panic!(
13360                "buffer is too small (need {} bytes, but got {})",
13361                Self::ENCODED_LEN,
13362                __tmp.remaining(),
13363            )
13364        }
13365        __tmp.put_u32_le(self.flags.bits());
13366        __tmp.put_f32_le(self.pitch);
13367        __tmp.put_f32_le(self.yaw);
13368        __tmp.put_f32_le(self.pitch_rate);
13369        __tmp.put_f32_le(self.yaw_rate);
13370        __tmp.put_u8(self.target_system);
13371        __tmp.put_u8(self.target_component);
13372        __tmp.put_u8(self.gimbal_device_id);
13373        if matches!(version, MavlinkVersion::V2) {
13374            let len = __tmp.len();
13375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13376        } else {
13377            __tmp.len()
13378        }
13379    }
13380}
13381#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13382#[doc = ""]
13383#[doc = "ID: 281"]
13384#[derive(Debug, Clone, PartialEq)]
13385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13387#[cfg_attr(feature = "ts", derive(TS))]
13388#[cfg_attr(feature = "ts", ts(export))]
13389pub struct GIMBAL_MANAGER_STATUS_DATA {
13390    #[doc = "Timestamp (time since system boot)."]
13391    pub time_boot_ms: u32,
13392    #[doc = "High level gimbal manager flags currently applied."]
13393    pub flags: GimbalManagerFlags,
13394    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13395    pub gimbal_device_id: u8,
13396    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13397    pub primary_control_sysid: u8,
13398    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13399    pub primary_control_compid: u8,
13400    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13401    pub secondary_control_sysid: u8,
13402    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13403    pub secondary_control_compid: u8,
13404}
13405impl GIMBAL_MANAGER_STATUS_DATA {
13406    pub const ENCODED_LEN: usize = 13usize;
13407    pub const DEFAULT: Self = Self {
13408        time_boot_ms: 0_u32,
13409        flags: GimbalManagerFlags::DEFAULT,
13410        gimbal_device_id: 0_u8,
13411        primary_control_sysid: 0_u8,
13412        primary_control_compid: 0_u8,
13413        secondary_control_sysid: 0_u8,
13414        secondary_control_compid: 0_u8,
13415    };
13416    #[cfg(feature = "arbitrary")]
13417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13418        use arbitrary::{Arbitrary, Unstructured};
13419        let mut buf = [0u8; 1024];
13420        rng.fill_bytes(&mut buf);
13421        let mut unstructured = Unstructured::new(&buf);
13422        Self::arbitrary(&mut unstructured).unwrap_or_default()
13423    }
13424}
13425impl Default for GIMBAL_MANAGER_STATUS_DATA {
13426    fn default() -> Self {
13427        Self::DEFAULT.clone()
13428    }
13429}
13430impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13431    type Message = MavMessage;
13432    const ID: u32 = 281u32;
13433    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13434    const EXTRA_CRC: u8 = 48u8;
13435    const ENCODED_LEN: usize = 13usize;
13436    fn deser(
13437        _version: MavlinkVersion,
13438        __input: &[u8],
13439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13440        let avail_len = __input.len();
13441        let mut payload_buf = [0; Self::ENCODED_LEN];
13442        let mut buf = if avail_len < Self::ENCODED_LEN {
13443            payload_buf[0..avail_len].copy_from_slice(__input);
13444            Bytes::new(&payload_buf)
13445        } else {
13446            Bytes::new(__input)
13447        };
13448        let mut __struct = Self::default();
13449        __struct.time_boot_ms = buf.get_u32_le();
13450        let tmp = buf.get_u32_le();
13451        __struct.flags = GimbalManagerFlags::from_bits(tmp).ok_or(
13452            ::mavlink_core::error::ParserError::InvalidFlag {
13453                flag_type: "GimbalManagerFlags",
13454                value: tmp as u64,
13455            },
13456        )?;
13457        __struct.gimbal_device_id = buf.get_u8();
13458        __struct.primary_control_sysid = buf.get_u8();
13459        __struct.primary_control_compid = buf.get_u8();
13460        __struct.secondary_control_sysid = buf.get_u8();
13461        __struct.secondary_control_compid = buf.get_u8();
13462        Ok(__struct)
13463    }
13464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13465        let mut __tmp = BytesMut::new(bytes);
13466        #[allow(clippy::absurd_extreme_comparisons)]
13467        #[allow(unused_comparisons)]
13468        if __tmp.remaining() < Self::ENCODED_LEN {
13469            panic!(
13470                "buffer is too small (need {} bytes, but got {})",
13471                Self::ENCODED_LEN,
13472                __tmp.remaining(),
13473            )
13474        }
13475        __tmp.put_u32_le(self.time_boot_ms);
13476        __tmp.put_u32_le(self.flags.bits());
13477        __tmp.put_u8(self.gimbal_device_id);
13478        __tmp.put_u8(self.primary_control_sysid);
13479        __tmp.put_u8(self.primary_control_compid);
13480        __tmp.put_u8(self.secondary_control_sysid);
13481        __tmp.put_u8(self.secondary_control_compid);
13482        if matches!(version, MavlinkVersion::V2) {
13483            let len = __tmp.len();
13484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13485        } else {
13486            __tmp.len()
13487        }
13488    }
13489}
13490#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13491#[doc = ""]
13492#[doc = "ID: 33"]
13493#[derive(Debug, Clone, PartialEq)]
13494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13496#[cfg_attr(feature = "ts", derive(TS))]
13497#[cfg_attr(feature = "ts", ts(export))]
13498pub struct GLOBAL_POSITION_INT_DATA {
13499    #[doc = "Timestamp (time since system boot)."]
13500    pub time_boot_ms: u32,
13501    #[doc = "Latitude, expressed"]
13502    pub lat: i32,
13503    #[doc = "Longitude, expressed"]
13504    pub lon: i32,
13505    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13506    pub alt: i32,
13507    #[doc = "Altitude above home"]
13508    pub relative_alt: i32,
13509    #[doc = "Ground X Speed (Latitude, positive north)"]
13510    pub vx: i16,
13511    #[doc = "Ground Y Speed (Longitude, positive east)"]
13512    pub vy: i16,
13513    #[doc = "Ground Z Speed (Altitude, positive down)"]
13514    pub vz: i16,
13515    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13516    pub hdg: u16,
13517}
13518impl GLOBAL_POSITION_INT_DATA {
13519    pub const ENCODED_LEN: usize = 28usize;
13520    pub const DEFAULT: Self = Self {
13521        time_boot_ms: 0_u32,
13522        lat: 0_i32,
13523        lon: 0_i32,
13524        alt: 0_i32,
13525        relative_alt: 0_i32,
13526        vx: 0_i16,
13527        vy: 0_i16,
13528        vz: 0_i16,
13529        hdg: 0_u16,
13530    };
13531    #[cfg(feature = "arbitrary")]
13532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13533        use arbitrary::{Arbitrary, Unstructured};
13534        let mut buf = [0u8; 1024];
13535        rng.fill_bytes(&mut buf);
13536        let mut unstructured = Unstructured::new(&buf);
13537        Self::arbitrary(&mut unstructured).unwrap_or_default()
13538    }
13539}
13540impl Default for GLOBAL_POSITION_INT_DATA {
13541    fn default() -> Self {
13542        Self::DEFAULT.clone()
13543    }
13544}
13545impl MessageData for GLOBAL_POSITION_INT_DATA {
13546    type Message = MavMessage;
13547    const ID: u32 = 33u32;
13548    const NAME: &'static str = "GLOBAL_POSITION_INT";
13549    const EXTRA_CRC: u8 = 104u8;
13550    const ENCODED_LEN: usize = 28usize;
13551    fn deser(
13552        _version: MavlinkVersion,
13553        __input: &[u8],
13554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13555        let avail_len = __input.len();
13556        let mut payload_buf = [0; Self::ENCODED_LEN];
13557        let mut buf = if avail_len < Self::ENCODED_LEN {
13558            payload_buf[0..avail_len].copy_from_slice(__input);
13559            Bytes::new(&payload_buf)
13560        } else {
13561            Bytes::new(__input)
13562        };
13563        let mut __struct = Self::default();
13564        __struct.time_boot_ms = buf.get_u32_le();
13565        __struct.lat = buf.get_i32_le();
13566        __struct.lon = buf.get_i32_le();
13567        __struct.alt = buf.get_i32_le();
13568        __struct.relative_alt = buf.get_i32_le();
13569        __struct.vx = buf.get_i16_le();
13570        __struct.vy = buf.get_i16_le();
13571        __struct.vz = buf.get_i16_le();
13572        __struct.hdg = buf.get_u16_le();
13573        Ok(__struct)
13574    }
13575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13576        let mut __tmp = BytesMut::new(bytes);
13577        #[allow(clippy::absurd_extreme_comparisons)]
13578        #[allow(unused_comparisons)]
13579        if __tmp.remaining() < Self::ENCODED_LEN {
13580            panic!(
13581                "buffer is too small (need {} bytes, but got {})",
13582                Self::ENCODED_LEN,
13583                __tmp.remaining(),
13584            )
13585        }
13586        __tmp.put_u32_le(self.time_boot_ms);
13587        __tmp.put_i32_le(self.lat);
13588        __tmp.put_i32_le(self.lon);
13589        __tmp.put_i32_le(self.alt);
13590        __tmp.put_i32_le(self.relative_alt);
13591        __tmp.put_i16_le(self.vx);
13592        __tmp.put_i16_le(self.vy);
13593        __tmp.put_i16_le(self.vz);
13594        __tmp.put_u16_le(self.hdg);
13595        if matches!(version, MavlinkVersion::V2) {
13596            let len = __tmp.len();
13597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13598        } else {
13599            __tmp.len()
13600        }
13601    }
13602}
13603#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13604#[doc = ""]
13605#[doc = "ID: 63"]
13606#[derive(Debug, Clone, PartialEq)]
13607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13609#[cfg_attr(feature = "ts", derive(TS))]
13610#[cfg_attr(feature = "ts", ts(export))]
13611pub struct GLOBAL_POSITION_INT_COV_DATA {
13612    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13613    pub time_usec: u64,
13614    #[doc = "Latitude"]
13615    pub lat: i32,
13616    #[doc = "Longitude"]
13617    pub lon: i32,
13618    #[doc = "Altitude in meters above MSL"]
13619    pub alt: i32,
13620    #[doc = "Altitude above ground"]
13621    pub relative_alt: i32,
13622    #[doc = "Ground X Speed (Latitude)"]
13623    pub vx: f32,
13624    #[doc = "Ground Y Speed (Longitude)"]
13625    pub vy: f32,
13626    #[doc = "Ground Z Speed (Altitude)"]
13627    pub vz: f32,
13628    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13630    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13631    pub covariance: [f32; 36],
13632    #[doc = "Class id of the estimator this estimate originated from."]
13633    pub estimator_type: MavEstimatorType,
13634}
13635impl GLOBAL_POSITION_INT_COV_DATA {
13636    pub const ENCODED_LEN: usize = 181usize;
13637    pub const DEFAULT: Self = Self {
13638        time_usec: 0_u64,
13639        lat: 0_i32,
13640        lon: 0_i32,
13641        alt: 0_i32,
13642        relative_alt: 0_i32,
13643        vx: 0.0_f32,
13644        vy: 0.0_f32,
13645        vz: 0.0_f32,
13646        covariance: [0.0_f32; 36usize],
13647        estimator_type: MavEstimatorType::DEFAULT,
13648    };
13649    #[cfg(feature = "arbitrary")]
13650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13651        use arbitrary::{Arbitrary, Unstructured};
13652        let mut buf = [0u8; 1024];
13653        rng.fill_bytes(&mut buf);
13654        let mut unstructured = Unstructured::new(&buf);
13655        Self::arbitrary(&mut unstructured).unwrap_or_default()
13656    }
13657}
13658impl Default for GLOBAL_POSITION_INT_COV_DATA {
13659    fn default() -> Self {
13660        Self::DEFAULT.clone()
13661    }
13662}
13663impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13664    type Message = MavMessage;
13665    const ID: u32 = 63u32;
13666    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13667    const EXTRA_CRC: u8 = 119u8;
13668    const ENCODED_LEN: usize = 181usize;
13669    fn deser(
13670        _version: MavlinkVersion,
13671        __input: &[u8],
13672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13673        let avail_len = __input.len();
13674        let mut payload_buf = [0; Self::ENCODED_LEN];
13675        let mut buf = if avail_len < Self::ENCODED_LEN {
13676            payload_buf[0..avail_len].copy_from_slice(__input);
13677            Bytes::new(&payload_buf)
13678        } else {
13679            Bytes::new(__input)
13680        };
13681        let mut __struct = Self::default();
13682        __struct.time_usec = buf.get_u64_le();
13683        __struct.lat = buf.get_i32_le();
13684        __struct.lon = buf.get_i32_le();
13685        __struct.alt = buf.get_i32_le();
13686        __struct.relative_alt = buf.get_i32_le();
13687        __struct.vx = buf.get_f32_le();
13688        __struct.vy = buf.get_f32_le();
13689        __struct.vz = buf.get_f32_le();
13690        for v in &mut __struct.covariance {
13691            let val = buf.get_f32_le();
13692            *v = val;
13693        }
13694        let tmp = buf.get_u8();
13695        __struct.estimator_type =
13696            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13697                enum_type: "MavEstimatorType",
13698                value: tmp as u64,
13699            })?;
13700        Ok(__struct)
13701    }
13702    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13703        let mut __tmp = BytesMut::new(bytes);
13704        #[allow(clippy::absurd_extreme_comparisons)]
13705        #[allow(unused_comparisons)]
13706        if __tmp.remaining() < Self::ENCODED_LEN {
13707            panic!(
13708                "buffer is too small (need {} bytes, but got {})",
13709                Self::ENCODED_LEN,
13710                __tmp.remaining(),
13711            )
13712        }
13713        __tmp.put_u64_le(self.time_usec);
13714        __tmp.put_i32_le(self.lat);
13715        __tmp.put_i32_le(self.lon);
13716        __tmp.put_i32_le(self.alt);
13717        __tmp.put_i32_le(self.relative_alt);
13718        __tmp.put_f32_le(self.vx);
13719        __tmp.put_f32_le(self.vy);
13720        __tmp.put_f32_le(self.vz);
13721        for val in &self.covariance {
13722            __tmp.put_f32_le(*val);
13723        }
13724        __tmp.put_u8(self.estimator_type as u8);
13725        if matches!(version, MavlinkVersion::V2) {
13726            let len = __tmp.len();
13727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13728        } else {
13729            __tmp.len()
13730        }
13731    }
13732}
13733#[doc = "Global position/attitude estimate from a vision source."]
13734#[doc = ""]
13735#[doc = "ID: 101"]
13736#[derive(Debug, Clone, PartialEq)]
13737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13739#[cfg_attr(feature = "ts", derive(TS))]
13740#[cfg_attr(feature = "ts", ts(export))]
13741pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13742    #[doc = "Timestamp (UNIX time or since system boot)"]
13743    pub usec: u64,
13744    #[doc = "Global X position"]
13745    pub x: f32,
13746    #[doc = "Global Y position"]
13747    pub y: f32,
13748    #[doc = "Global Z position"]
13749    pub z: f32,
13750    #[doc = "Roll angle"]
13751    pub roll: f32,
13752    #[doc = "Pitch angle"]
13753    pub pitch: f32,
13754    #[doc = "Yaw angle"]
13755    pub yaw: f32,
13756    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13757    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13758    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13759    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13760    pub covariance: [f32; 21],
13761    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13762    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13763    pub reset_counter: u8,
13764}
13765impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13766    pub const ENCODED_LEN: usize = 117usize;
13767    pub const DEFAULT: Self = Self {
13768        usec: 0_u64,
13769        x: 0.0_f32,
13770        y: 0.0_f32,
13771        z: 0.0_f32,
13772        roll: 0.0_f32,
13773        pitch: 0.0_f32,
13774        yaw: 0.0_f32,
13775        covariance: [0.0_f32; 21usize],
13776        reset_counter: 0_u8,
13777    };
13778    #[cfg(feature = "arbitrary")]
13779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13780        use arbitrary::{Arbitrary, Unstructured};
13781        let mut buf = [0u8; 1024];
13782        rng.fill_bytes(&mut buf);
13783        let mut unstructured = Unstructured::new(&buf);
13784        Self::arbitrary(&mut unstructured).unwrap_or_default()
13785    }
13786}
13787impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13788    fn default() -> Self {
13789        Self::DEFAULT.clone()
13790    }
13791}
13792impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13793    type Message = MavMessage;
13794    const ID: u32 = 101u32;
13795    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13796    const EXTRA_CRC: u8 = 102u8;
13797    const ENCODED_LEN: usize = 117usize;
13798    fn deser(
13799        _version: MavlinkVersion,
13800        __input: &[u8],
13801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13802        let avail_len = __input.len();
13803        let mut payload_buf = [0; Self::ENCODED_LEN];
13804        let mut buf = if avail_len < Self::ENCODED_LEN {
13805            payload_buf[0..avail_len].copy_from_slice(__input);
13806            Bytes::new(&payload_buf)
13807        } else {
13808            Bytes::new(__input)
13809        };
13810        let mut __struct = Self::default();
13811        __struct.usec = buf.get_u64_le();
13812        __struct.x = buf.get_f32_le();
13813        __struct.y = buf.get_f32_le();
13814        __struct.z = buf.get_f32_le();
13815        __struct.roll = buf.get_f32_le();
13816        __struct.pitch = buf.get_f32_le();
13817        __struct.yaw = buf.get_f32_le();
13818        for v in &mut __struct.covariance {
13819            let val = buf.get_f32_le();
13820            *v = val;
13821        }
13822        __struct.reset_counter = buf.get_u8();
13823        Ok(__struct)
13824    }
13825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13826        let mut __tmp = BytesMut::new(bytes);
13827        #[allow(clippy::absurd_extreme_comparisons)]
13828        #[allow(unused_comparisons)]
13829        if __tmp.remaining() < Self::ENCODED_LEN {
13830            panic!(
13831                "buffer is too small (need {} bytes, but got {})",
13832                Self::ENCODED_LEN,
13833                __tmp.remaining(),
13834            )
13835        }
13836        __tmp.put_u64_le(self.usec);
13837        __tmp.put_f32_le(self.x);
13838        __tmp.put_f32_le(self.y);
13839        __tmp.put_f32_le(self.z);
13840        __tmp.put_f32_le(self.roll);
13841        __tmp.put_f32_le(self.pitch);
13842        __tmp.put_f32_le(self.yaw);
13843        if matches!(version, MavlinkVersion::V2) {
13844            for val in &self.covariance {
13845                __tmp.put_f32_le(*val);
13846            }
13847            __tmp.put_u8(self.reset_counter);
13848            let len = __tmp.len();
13849            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13850        } else {
13851            __tmp.len()
13852        }
13853    }
13854}
13855#[doc = "Second GPS data."]
13856#[doc = ""]
13857#[doc = "ID: 124"]
13858#[derive(Debug, Clone, PartialEq)]
13859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13861#[cfg_attr(feature = "ts", derive(TS))]
13862#[cfg_attr(feature = "ts", ts(export))]
13863pub struct GPS2_RAW_DATA {
13864    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13865    pub time_usec: u64,
13866    #[doc = "Latitude (WGS84)"]
13867    pub lat: i32,
13868    #[doc = "Longitude (WGS84)"]
13869    pub lon: i32,
13870    #[doc = "Altitude (MSL). Positive for up."]
13871    pub alt: i32,
13872    #[doc = "Age of DGPS info"]
13873    pub dgps_age: u32,
13874    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13875    pub eph: u16,
13876    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13877    pub epv: u16,
13878    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13879    pub vel: u16,
13880    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13881    pub cog: u16,
13882    #[doc = "GPS fix type."]
13883    pub fix_type: GpsFixType,
13884    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13885    pub satellites_visible: u8,
13886    #[doc = "Number of DGPS satellites"]
13887    pub dgps_numch: u8,
13888    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13890    pub yaw: u16,
13891    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13892    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13893    pub alt_ellipsoid: i32,
13894    #[doc = "Position uncertainty."]
13895    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13896    pub h_acc: u32,
13897    #[doc = "Altitude uncertainty."]
13898    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13899    pub v_acc: u32,
13900    #[doc = "Speed uncertainty."]
13901    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13902    pub vel_acc: u32,
13903    #[doc = "Heading / track uncertainty"]
13904    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13905    pub hdg_acc: u32,
13906}
13907impl GPS2_RAW_DATA {
13908    pub const ENCODED_LEN: usize = 57usize;
13909    pub const DEFAULT: Self = Self {
13910        time_usec: 0_u64,
13911        lat: 0_i32,
13912        lon: 0_i32,
13913        alt: 0_i32,
13914        dgps_age: 0_u32,
13915        eph: 0_u16,
13916        epv: 0_u16,
13917        vel: 0_u16,
13918        cog: 0_u16,
13919        fix_type: GpsFixType::DEFAULT,
13920        satellites_visible: 0_u8,
13921        dgps_numch: 0_u8,
13922        yaw: 0_u16,
13923        alt_ellipsoid: 0_i32,
13924        h_acc: 0_u32,
13925        v_acc: 0_u32,
13926        vel_acc: 0_u32,
13927        hdg_acc: 0_u32,
13928    };
13929    #[cfg(feature = "arbitrary")]
13930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13931        use arbitrary::{Arbitrary, Unstructured};
13932        let mut buf = [0u8; 1024];
13933        rng.fill_bytes(&mut buf);
13934        let mut unstructured = Unstructured::new(&buf);
13935        Self::arbitrary(&mut unstructured).unwrap_or_default()
13936    }
13937}
13938impl Default for GPS2_RAW_DATA {
13939    fn default() -> Self {
13940        Self::DEFAULT.clone()
13941    }
13942}
13943impl MessageData for GPS2_RAW_DATA {
13944    type Message = MavMessage;
13945    const ID: u32 = 124u32;
13946    const NAME: &'static str = "GPS2_RAW";
13947    const EXTRA_CRC: u8 = 87u8;
13948    const ENCODED_LEN: usize = 57usize;
13949    fn deser(
13950        _version: MavlinkVersion,
13951        __input: &[u8],
13952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13953        let avail_len = __input.len();
13954        let mut payload_buf = [0; Self::ENCODED_LEN];
13955        let mut buf = if avail_len < Self::ENCODED_LEN {
13956            payload_buf[0..avail_len].copy_from_slice(__input);
13957            Bytes::new(&payload_buf)
13958        } else {
13959            Bytes::new(__input)
13960        };
13961        let mut __struct = Self::default();
13962        __struct.time_usec = buf.get_u64_le();
13963        __struct.lat = buf.get_i32_le();
13964        __struct.lon = buf.get_i32_le();
13965        __struct.alt = buf.get_i32_le();
13966        __struct.dgps_age = buf.get_u32_le();
13967        __struct.eph = buf.get_u16_le();
13968        __struct.epv = buf.get_u16_le();
13969        __struct.vel = buf.get_u16_le();
13970        __struct.cog = buf.get_u16_le();
13971        let tmp = buf.get_u8();
13972        __struct.fix_type =
13973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13974                enum_type: "GpsFixType",
13975                value: tmp as u64,
13976            })?;
13977        __struct.satellites_visible = buf.get_u8();
13978        __struct.dgps_numch = buf.get_u8();
13979        __struct.yaw = buf.get_u16_le();
13980        __struct.alt_ellipsoid = buf.get_i32_le();
13981        __struct.h_acc = buf.get_u32_le();
13982        __struct.v_acc = buf.get_u32_le();
13983        __struct.vel_acc = buf.get_u32_le();
13984        __struct.hdg_acc = buf.get_u32_le();
13985        Ok(__struct)
13986    }
13987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13988        let mut __tmp = BytesMut::new(bytes);
13989        #[allow(clippy::absurd_extreme_comparisons)]
13990        #[allow(unused_comparisons)]
13991        if __tmp.remaining() < Self::ENCODED_LEN {
13992            panic!(
13993                "buffer is too small (need {} bytes, but got {})",
13994                Self::ENCODED_LEN,
13995                __tmp.remaining(),
13996            )
13997        }
13998        __tmp.put_u64_le(self.time_usec);
13999        __tmp.put_i32_le(self.lat);
14000        __tmp.put_i32_le(self.lon);
14001        __tmp.put_i32_le(self.alt);
14002        __tmp.put_u32_le(self.dgps_age);
14003        __tmp.put_u16_le(self.eph);
14004        __tmp.put_u16_le(self.epv);
14005        __tmp.put_u16_le(self.vel);
14006        __tmp.put_u16_le(self.cog);
14007        __tmp.put_u8(self.fix_type as u8);
14008        __tmp.put_u8(self.satellites_visible);
14009        __tmp.put_u8(self.dgps_numch);
14010        if matches!(version, MavlinkVersion::V2) {
14011            __tmp.put_u16_le(self.yaw);
14012            __tmp.put_i32_le(self.alt_ellipsoid);
14013            __tmp.put_u32_le(self.h_acc);
14014            __tmp.put_u32_le(self.v_acc);
14015            __tmp.put_u32_le(self.vel_acc);
14016            __tmp.put_u32_le(self.hdg_acc);
14017            let len = __tmp.len();
14018            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14019        } else {
14020            __tmp.len()
14021        }
14022    }
14023}
14024#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14025#[doc = ""]
14026#[doc = "ID: 128"]
14027#[derive(Debug, Clone, PartialEq)]
14028#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14029#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14030#[cfg_attr(feature = "ts", derive(TS))]
14031#[cfg_attr(feature = "ts", ts(export))]
14032pub struct GPS2_RTK_DATA {
14033    #[doc = "Time since boot of last baseline message received."]
14034    pub time_last_baseline_ms: u32,
14035    #[doc = "GPS Time of Week of last baseline"]
14036    pub tow: u32,
14037    #[doc = "Current baseline in ECEF x or NED north component."]
14038    pub baseline_a_mm: i32,
14039    #[doc = "Current baseline in ECEF y or NED east component."]
14040    pub baseline_b_mm: i32,
14041    #[doc = "Current baseline in ECEF z or NED down component."]
14042    pub baseline_c_mm: i32,
14043    #[doc = "Current estimate of baseline accuracy."]
14044    pub accuracy: u32,
14045    #[doc = "Current number of integer ambiguity hypotheses."]
14046    pub iar_num_hypotheses: i32,
14047    #[doc = "GPS Week Number of last baseline"]
14048    pub wn: u16,
14049    #[doc = "Identification of connected RTK receiver."]
14050    pub rtk_receiver_id: u8,
14051    #[doc = "GPS-specific health report for RTK data."]
14052    pub rtk_health: u8,
14053    #[doc = "Rate of baseline messages being received by GPS"]
14054    pub rtk_rate: u8,
14055    #[doc = "Current number of sats used for RTK calculation."]
14056    pub nsats: u8,
14057    #[doc = "Coordinate system of baseline"]
14058    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14059}
14060impl GPS2_RTK_DATA {
14061    pub const ENCODED_LEN: usize = 35usize;
14062    pub const DEFAULT: Self = Self {
14063        time_last_baseline_ms: 0_u32,
14064        tow: 0_u32,
14065        baseline_a_mm: 0_i32,
14066        baseline_b_mm: 0_i32,
14067        baseline_c_mm: 0_i32,
14068        accuracy: 0_u32,
14069        iar_num_hypotheses: 0_i32,
14070        wn: 0_u16,
14071        rtk_receiver_id: 0_u8,
14072        rtk_health: 0_u8,
14073        rtk_rate: 0_u8,
14074        nsats: 0_u8,
14075        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14076    };
14077    #[cfg(feature = "arbitrary")]
14078    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14079        use arbitrary::{Arbitrary, Unstructured};
14080        let mut buf = [0u8; 1024];
14081        rng.fill_bytes(&mut buf);
14082        let mut unstructured = Unstructured::new(&buf);
14083        Self::arbitrary(&mut unstructured).unwrap_or_default()
14084    }
14085}
14086impl Default for GPS2_RTK_DATA {
14087    fn default() -> Self {
14088        Self::DEFAULT.clone()
14089    }
14090}
14091impl MessageData for GPS2_RTK_DATA {
14092    type Message = MavMessage;
14093    const ID: u32 = 128u32;
14094    const NAME: &'static str = "GPS2_RTK";
14095    const EXTRA_CRC: u8 = 226u8;
14096    const ENCODED_LEN: usize = 35usize;
14097    fn deser(
14098        _version: MavlinkVersion,
14099        __input: &[u8],
14100    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14101        let avail_len = __input.len();
14102        let mut payload_buf = [0; Self::ENCODED_LEN];
14103        let mut buf = if avail_len < Self::ENCODED_LEN {
14104            payload_buf[0..avail_len].copy_from_slice(__input);
14105            Bytes::new(&payload_buf)
14106        } else {
14107            Bytes::new(__input)
14108        };
14109        let mut __struct = Self::default();
14110        __struct.time_last_baseline_ms = buf.get_u32_le();
14111        __struct.tow = buf.get_u32_le();
14112        __struct.baseline_a_mm = buf.get_i32_le();
14113        __struct.baseline_b_mm = buf.get_i32_le();
14114        __struct.baseline_c_mm = buf.get_i32_le();
14115        __struct.accuracy = buf.get_u32_le();
14116        __struct.iar_num_hypotheses = buf.get_i32_le();
14117        __struct.wn = buf.get_u16_le();
14118        __struct.rtk_receiver_id = buf.get_u8();
14119        __struct.rtk_health = buf.get_u8();
14120        __struct.rtk_rate = buf.get_u8();
14121        __struct.nsats = buf.get_u8();
14122        let tmp = buf.get_u8();
14123        __struct.baseline_coords_type =
14124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14125                enum_type: "RtkBaselineCoordinateSystem",
14126                value: tmp as u64,
14127            })?;
14128        Ok(__struct)
14129    }
14130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14131        let mut __tmp = BytesMut::new(bytes);
14132        #[allow(clippy::absurd_extreme_comparisons)]
14133        #[allow(unused_comparisons)]
14134        if __tmp.remaining() < Self::ENCODED_LEN {
14135            panic!(
14136                "buffer is too small (need {} bytes, but got {})",
14137                Self::ENCODED_LEN,
14138                __tmp.remaining(),
14139            )
14140        }
14141        __tmp.put_u32_le(self.time_last_baseline_ms);
14142        __tmp.put_u32_le(self.tow);
14143        __tmp.put_i32_le(self.baseline_a_mm);
14144        __tmp.put_i32_le(self.baseline_b_mm);
14145        __tmp.put_i32_le(self.baseline_c_mm);
14146        __tmp.put_u32_le(self.accuracy);
14147        __tmp.put_i32_le(self.iar_num_hypotheses);
14148        __tmp.put_u16_le(self.wn);
14149        __tmp.put_u8(self.rtk_receiver_id);
14150        __tmp.put_u8(self.rtk_health);
14151        __tmp.put_u8(self.rtk_rate);
14152        __tmp.put_u8(self.nsats);
14153        __tmp.put_u8(self.baseline_coords_type as u8);
14154        if matches!(version, MavlinkVersion::V2) {
14155            let len = __tmp.len();
14156            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14157        } else {
14158            __tmp.len()
14159        }
14160    }
14161}
14162#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14163#[doc = ""]
14164#[doc = "ID: 49"]
14165#[derive(Debug, Clone, PartialEq)]
14166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14168#[cfg_attr(feature = "ts", derive(TS))]
14169#[cfg_attr(feature = "ts", ts(export))]
14170pub struct GPS_GLOBAL_ORIGIN_DATA {
14171    #[doc = "Latitude (WGS84)"]
14172    pub latitude: i32,
14173    #[doc = "Longitude (WGS84)"]
14174    pub longitude: i32,
14175    #[doc = "Altitude (MSL). Positive for up."]
14176    pub altitude: i32,
14177    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14178    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14179    pub time_usec: u64,
14180}
14181impl GPS_GLOBAL_ORIGIN_DATA {
14182    pub const ENCODED_LEN: usize = 20usize;
14183    pub const DEFAULT: Self = Self {
14184        latitude: 0_i32,
14185        longitude: 0_i32,
14186        altitude: 0_i32,
14187        time_usec: 0_u64,
14188    };
14189    #[cfg(feature = "arbitrary")]
14190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14191        use arbitrary::{Arbitrary, Unstructured};
14192        let mut buf = [0u8; 1024];
14193        rng.fill_bytes(&mut buf);
14194        let mut unstructured = Unstructured::new(&buf);
14195        Self::arbitrary(&mut unstructured).unwrap_or_default()
14196    }
14197}
14198impl Default for GPS_GLOBAL_ORIGIN_DATA {
14199    fn default() -> Self {
14200        Self::DEFAULT.clone()
14201    }
14202}
14203impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14204    type Message = MavMessage;
14205    const ID: u32 = 49u32;
14206    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14207    const EXTRA_CRC: u8 = 39u8;
14208    const ENCODED_LEN: usize = 20usize;
14209    fn deser(
14210        _version: MavlinkVersion,
14211        __input: &[u8],
14212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14213        let avail_len = __input.len();
14214        let mut payload_buf = [0; Self::ENCODED_LEN];
14215        let mut buf = if avail_len < Self::ENCODED_LEN {
14216            payload_buf[0..avail_len].copy_from_slice(__input);
14217            Bytes::new(&payload_buf)
14218        } else {
14219            Bytes::new(__input)
14220        };
14221        let mut __struct = Self::default();
14222        __struct.latitude = buf.get_i32_le();
14223        __struct.longitude = buf.get_i32_le();
14224        __struct.altitude = buf.get_i32_le();
14225        __struct.time_usec = buf.get_u64_le();
14226        Ok(__struct)
14227    }
14228    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14229        let mut __tmp = BytesMut::new(bytes);
14230        #[allow(clippy::absurd_extreme_comparisons)]
14231        #[allow(unused_comparisons)]
14232        if __tmp.remaining() < Self::ENCODED_LEN {
14233            panic!(
14234                "buffer is too small (need {} bytes, but got {})",
14235                Self::ENCODED_LEN,
14236                __tmp.remaining(),
14237            )
14238        }
14239        __tmp.put_i32_le(self.latitude);
14240        __tmp.put_i32_le(self.longitude);
14241        __tmp.put_i32_le(self.altitude);
14242        if matches!(version, MavlinkVersion::V2) {
14243            __tmp.put_u64_le(self.time_usec);
14244            let len = __tmp.len();
14245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14246        } else {
14247            __tmp.len()
14248        }
14249    }
14250}
14251#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14252#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14253#[doc = ""]
14254#[doc = "ID: 123"]
14255#[derive(Debug, Clone, PartialEq)]
14256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14257#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14258#[cfg_attr(feature = "ts", derive(TS))]
14259#[cfg_attr(feature = "ts", ts(export))]
14260pub struct GPS_INJECT_DATA_DATA {
14261    #[doc = "System ID"]
14262    pub target_system: u8,
14263    #[doc = "Component ID"]
14264    pub target_component: u8,
14265    #[doc = "Data length"]
14266    pub len: u8,
14267    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14268    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14269    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14270    pub data: [u8; 110],
14271}
14272impl GPS_INJECT_DATA_DATA {
14273    pub const ENCODED_LEN: usize = 113usize;
14274    pub const DEFAULT: Self = Self {
14275        target_system: 0_u8,
14276        target_component: 0_u8,
14277        len: 0_u8,
14278        data: [0_u8; 110usize],
14279    };
14280    #[cfg(feature = "arbitrary")]
14281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14282        use arbitrary::{Arbitrary, Unstructured};
14283        let mut buf = [0u8; 1024];
14284        rng.fill_bytes(&mut buf);
14285        let mut unstructured = Unstructured::new(&buf);
14286        Self::arbitrary(&mut unstructured).unwrap_or_default()
14287    }
14288}
14289impl Default for GPS_INJECT_DATA_DATA {
14290    fn default() -> Self {
14291        Self::DEFAULT.clone()
14292    }
14293}
14294impl MessageData for GPS_INJECT_DATA_DATA {
14295    type Message = MavMessage;
14296    const ID: u32 = 123u32;
14297    const NAME: &'static str = "GPS_INJECT_DATA";
14298    const EXTRA_CRC: u8 = 250u8;
14299    const ENCODED_LEN: usize = 113usize;
14300    fn deser(
14301        _version: MavlinkVersion,
14302        __input: &[u8],
14303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14304        let avail_len = __input.len();
14305        let mut payload_buf = [0; Self::ENCODED_LEN];
14306        let mut buf = if avail_len < Self::ENCODED_LEN {
14307            payload_buf[0..avail_len].copy_from_slice(__input);
14308            Bytes::new(&payload_buf)
14309        } else {
14310            Bytes::new(__input)
14311        };
14312        let mut __struct = Self::default();
14313        __struct.target_system = buf.get_u8();
14314        __struct.target_component = buf.get_u8();
14315        __struct.len = buf.get_u8();
14316        for v in &mut __struct.data {
14317            let val = buf.get_u8();
14318            *v = val;
14319        }
14320        Ok(__struct)
14321    }
14322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14323        let mut __tmp = BytesMut::new(bytes);
14324        #[allow(clippy::absurd_extreme_comparisons)]
14325        #[allow(unused_comparisons)]
14326        if __tmp.remaining() < Self::ENCODED_LEN {
14327            panic!(
14328                "buffer is too small (need {} bytes, but got {})",
14329                Self::ENCODED_LEN,
14330                __tmp.remaining(),
14331            )
14332        }
14333        __tmp.put_u8(self.target_system);
14334        __tmp.put_u8(self.target_component);
14335        __tmp.put_u8(self.len);
14336        for val in &self.data {
14337            __tmp.put_u8(*val);
14338        }
14339        if matches!(version, MavlinkVersion::V2) {
14340            let len = __tmp.len();
14341            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14342        } else {
14343            __tmp.len()
14344        }
14345    }
14346}
14347#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14348#[doc = ""]
14349#[doc = "ID: 232"]
14350#[derive(Debug, Clone, PartialEq)]
14351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14352#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14353#[cfg_attr(feature = "ts", derive(TS))]
14354#[cfg_attr(feature = "ts", ts(export))]
14355pub struct GPS_INPUT_DATA {
14356    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14357    pub time_usec: u64,
14358    #[doc = "GPS time (from start of GPS week)"]
14359    pub time_week_ms: u32,
14360    #[doc = "Latitude (WGS84)"]
14361    pub lat: i32,
14362    #[doc = "Longitude (WGS84)"]
14363    pub lon: i32,
14364    #[doc = "Altitude (MSL). Positive for up."]
14365    pub alt: f32,
14366    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14367    pub hdop: f32,
14368    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14369    pub vdop: f32,
14370    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14371    pub vn: f32,
14372    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14373    pub ve: f32,
14374    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14375    pub vd: f32,
14376    #[doc = "GPS speed accuracy"]
14377    pub speed_accuracy: f32,
14378    #[doc = "GPS horizontal accuracy"]
14379    pub horiz_accuracy: f32,
14380    #[doc = "GPS vertical accuracy"]
14381    pub vert_accuracy: f32,
14382    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14383    pub ignore_flags: GpsInputIgnoreFlags,
14384    #[doc = "GPS week number"]
14385    pub time_week: u16,
14386    #[doc = "ID of the GPS for multiple GPS inputs"]
14387    pub gps_id: u8,
14388    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14389    pub fix_type: u8,
14390    #[doc = "Number of satellites visible."]
14391    pub satellites_visible: u8,
14392    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14393    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14394    pub yaw: u16,
14395}
14396impl GPS_INPUT_DATA {
14397    pub const ENCODED_LEN: usize = 65usize;
14398    pub const DEFAULT: Self = Self {
14399        time_usec: 0_u64,
14400        time_week_ms: 0_u32,
14401        lat: 0_i32,
14402        lon: 0_i32,
14403        alt: 0.0_f32,
14404        hdop: 0.0_f32,
14405        vdop: 0.0_f32,
14406        vn: 0.0_f32,
14407        ve: 0.0_f32,
14408        vd: 0.0_f32,
14409        speed_accuracy: 0.0_f32,
14410        horiz_accuracy: 0.0_f32,
14411        vert_accuracy: 0.0_f32,
14412        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14413        time_week: 0_u16,
14414        gps_id: 0_u8,
14415        fix_type: 0_u8,
14416        satellites_visible: 0_u8,
14417        yaw: 0_u16,
14418    };
14419    #[cfg(feature = "arbitrary")]
14420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14421        use arbitrary::{Arbitrary, Unstructured};
14422        let mut buf = [0u8; 1024];
14423        rng.fill_bytes(&mut buf);
14424        let mut unstructured = Unstructured::new(&buf);
14425        Self::arbitrary(&mut unstructured).unwrap_or_default()
14426    }
14427}
14428impl Default for GPS_INPUT_DATA {
14429    fn default() -> Self {
14430        Self::DEFAULT.clone()
14431    }
14432}
14433impl MessageData for GPS_INPUT_DATA {
14434    type Message = MavMessage;
14435    const ID: u32 = 232u32;
14436    const NAME: &'static str = "GPS_INPUT";
14437    const EXTRA_CRC: u8 = 151u8;
14438    const ENCODED_LEN: usize = 65usize;
14439    fn deser(
14440        _version: MavlinkVersion,
14441        __input: &[u8],
14442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14443        let avail_len = __input.len();
14444        let mut payload_buf = [0; Self::ENCODED_LEN];
14445        let mut buf = if avail_len < Self::ENCODED_LEN {
14446            payload_buf[0..avail_len].copy_from_slice(__input);
14447            Bytes::new(&payload_buf)
14448        } else {
14449            Bytes::new(__input)
14450        };
14451        let mut __struct = Self::default();
14452        __struct.time_usec = buf.get_u64_le();
14453        __struct.time_week_ms = buf.get_u32_le();
14454        __struct.lat = buf.get_i32_le();
14455        __struct.lon = buf.get_i32_le();
14456        __struct.alt = buf.get_f32_le();
14457        __struct.hdop = buf.get_f32_le();
14458        __struct.vdop = buf.get_f32_le();
14459        __struct.vn = buf.get_f32_le();
14460        __struct.ve = buf.get_f32_le();
14461        __struct.vd = buf.get_f32_le();
14462        __struct.speed_accuracy = buf.get_f32_le();
14463        __struct.horiz_accuracy = buf.get_f32_le();
14464        __struct.vert_accuracy = buf.get_f32_le();
14465        let tmp = buf.get_u16_le();
14466        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(tmp).ok_or(
14467            ::mavlink_core::error::ParserError::InvalidFlag {
14468                flag_type: "GpsInputIgnoreFlags",
14469                value: tmp as u64,
14470            },
14471        )?;
14472        __struct.time_week = buf.get_u16_le();
14473        __struct.gps_id = buf.get_u8();
14474        __struct.fix_type = buf.get_u8();
14475        __struct.satellites_visible = buf.get_u8();
14476        __struct.yaw = buf.get_u16_le();
14477        Ok(__struct)
14478    }
14479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14480        let mut __tmp = BytesMut::new(bytes);
14481        #[allow(clippy::absurd_extreme_comparisons)]
14482        #[allow(unused_comparisons)]
14483        if __tmp.remaining() < Self::ENCODED_LEN {
14484            panic!(
14485                "buffer is too small (need {} bytes, but got {})",
14486                Self::ENCODED_LEN,
14487                __tmp.remaining(),
14488            )
14489        }
14490        __tmp.put_u64_le(self.time_usec);
14491        __tmp.put_u32_le(self.time_week_ms);
14492        __tmp.put_i32_le(self.lat);
14493        __tmp.put_i32_le(self.lon);
14494        __tmp.put_f32_le(self.alt);
14495        __tmp.put_f32_le(self.hdop);
14496        __tmp.put_f32_le(self.vdop);
14497        __tmp.put_f32_le(self.vn);
14498        __tmp.put_f32_le(self.ve);
14499        __tmp.put_f32_le(self.vd);
14500        __tmp.put_f32_le(self.speed_accuracy);
14501        __tmp.put_f32_le(self.horiz_accuracy);
14502        __tmp.put_f32_le(self.vert_accuracy);
14503        __tmp.put_u16_le(self.ignore_flags.bits());
14504        __tmp.put_u16_le(self.time_week);
14505        __tmp.put_u8(self.gps_id);
14506        __tmp.put_u8(self.fix_type);
14507        __tmp.put_u8(self.satellites_visible);
14508        if matches!(version, MavlinkVersion::V2) {
14509            __tmp.put_u16_le(self.yaw);
14510            let len = __tmp.len();
14511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14512        } else {
14513            __tmp.len()
14514        }
14515    }
14516}
14517#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14518#[doc = ""]
14519#[doc = "ID: 24"]
14520#[derive(Debug, Clone, PartialEq)]
14521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14523#[cfg_attr(feature = "ts", derive(TS))]
14524#[cfg_attr(feature = "ts", ts(export))]
14525pub struct GPS_RAW_INT_DATA {
14526    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14527    pub time_usec: u64,
14528    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14529    pub lat: i32,
14530    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14531    pub lon: i32,
14532    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14533    pub alt: i32,
14534    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14535    pub eph: u16,
14536    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14537    pub epv: u16,
14538    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14539    pub vel: u16,
14540    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14541    pub cog: u16,
14542    #[doc = "GPS fix type."]
14543    pub fix_type: GpsFixType,
14544    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14545    pub satellites_visible: u8,
14546    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14547    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14548    pub alt_ellipsoid: i32,
14549    #[doc = "Position uncertainty."]
14550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14551    pub h_acc: u32,
14552    #[doc = "Altitude uncertainty."]
14553    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14554    pub v_acc: u32,
14555    #[doc = "Speed uncertainty."]
14556    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14557    pub vel_acc: u32,
14558    #[doc = "Heading / track uncertainty"]
14559    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14560    pub hdg_acc: u32,
14561    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14563    pub yaw: u16,
14564}
14565impl GPS_RAW_INT_DATA {
14566    pub const ENCODED_LEN: usize = 52usize;
14567    pub const DEFAULT: Self = Self {
14568        time_usec: 0_u64,
14569        lat: 0_i32,
14570        lon: 0_i32,
14571        alt: 0_i32,
14572        eph: 0_u16,
14573        epv: 0_u16,
14574        vel: 0_u16,
14575        cog: 0_u16,
14576        fix_type: GpsFixType::DEFAULT,
14577        satellites_visible: 0_u8,
14578        alt_ellipsoid: 0_i32,
14579        h_acc: 0_u32,
14580        v_acc: 0_u32,
14581        vel_acc: 0_u32,
14582        hdg_acc: 0_u32,
14583        yaw: 0_u16,
14584    };
14585    #[cfg(feature = "arbitrary")]
14586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14587        use arbitrary::{Arbitrary, Unstructured};
14588        let mut buf = [0u8; 1024];
14589        rng.fill_bytes(&mut buf);
14590        let mut unstructured = Unstructured::new(&buf);
14591        Self::arbitrary(&mut unstructured).unwrap_or_default()
14592    }
14593}
14594impl Default for GPS_RAW_INT_DATA {
14595    fn default() -> Self {
14596        Self::DEFAULT.clone()
14597    }
14598}
14599impl MessageData for GPS_RAW_INT_DATA {
14600    type Message = MavMessage;
14601    const ID: u32 = 24u32;
14602    const NAME: &'static str = "GPS_RAW_INT";
14603    const EXTRA_CRC: u8 = 24u8;
14604    const ENCODED_LEN: usize = 52usize;
14605    fn deser(
14606        _version: MavlinkVersion,
14607        __input: &[u8],
14608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14609        let avail_len = __input.len();
14610        let mut payload_buf = [0; Self::ENCODED_LEN];
14611        let mut buf = if avail_len < Self::ENCODED_LEN {
14612            payload_buf[0..avail_len].copy_from_slice(__input);
14613            Bytes::new(&payload_buf)
14614        } else {
14615            Bytes::new(__input)
14616        };
14617        let mut __struct = Self::default();
14618        __struct.time_usec = buf.get_u64_le();
14619        __struct.lat = buf.get_i32_le();
14620        __struct.lon = buf.get_i32_le();
14621        __struct.alt = buf.get_i32_le();
14622        __struct.eph = buf.get_u16_le();
14623        __struct.epv = buf.get_u16_le();
14624        __struct.vel = buf.get_u16_le();
14625        __struct.cog = buf.get_u16_le();
14626        let tmp = buf.get_u8();
14627        __struct.fix_type =
14628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14629                enum_type: "GpsFixType",
14630                value: tmp as u64,
14631            })?;
14632        __struct.satellites_visible = buf.get_u8();
14633        __struct.alt_ellipsoid = buf.get_i32_le();
14634        __struct.h_acc = buf.get_u32_le();
14635        __struct.v_acc = buf.get_u32_le();
14636        __struct.vel_acc = buf.get_u32_le();
14637        __struct.hdg_acc = buf.get_u32_le();
14638        __struct.yaw = buf.get_u16_le();
14639        Ok(__struct)
14640    }
14641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14642        let mut __tmp = BytesMut::new(bytes);
14643        #[allow(clippy::absurd_extreme_comparisons)]
14644        #[allow(unused_comparisons)]
14645        if __tmp.remaining() < Self::ENCODED_LEN {
14646            panic!(
14647                "buffer is too small (need {} bytes, but got {})",
14648                Self::ENCODED_LEN,
14649                __tmp.remaining(),
14650            )
14651        }
14652        __tmp.put_u64_le(self.time_usec);
14653        __tmp.put_i32_le(self.lat);
14654        __tmp.put_i32_le(self.lon);
14655        __tmp.put_i32_le(self.alt);
14656        __tmp.put_u16_le(self.eph);
14657        __tmp.put_u16_le(self.epv);
14658        __tmp.put_u16_le(self.vel);
14659        __tmp.put_u16_le(self.cog);
14660        __tmp.put_u8(self.fix_type as u8);
14661        __tmp.put_u8(self.satellites_visible);
14662        if matches!(version, MavlinkVersion::V2) {
14663            __tmp.put_i32_le(self.alt_ellipsoid);
14664            __tmp.put_u32_le(self.h_acc);
14665            __tmp.put_u32_le(self.v_acc);
14666            __tmp.put_u32_le(self.vel_acc);
14667            __tmp.put_u32_le(self.hdg_acc);
14668            __tmp.put_u16_le(self.yaw);
14669            let len = __tmp.len();
14670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14671        } else {
14672            __tmp.len()
14673        }
14674    }
14675}
14676#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14677#[doc = ""]
14678#[doc = "ID: 233"]
14679#[derive(Debug, Clone, PartialEq)]
14680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14682#[cfg_attr(feature = "ts", derive(TS))]
14683#[cfg_attr(feature = "ts", ts(export))]
14684pub struct GPS_RTCM_DATA_DATA {
14685    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14686    pub flags: u8,
14687    #[doc = "data length"]
14688    pub len: u8,
14689    #[doc = "RTCM message (may be fragmented)"]
14690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14692    pub data: [u8; 180],
14693}
14694impl GPS_RTCM_DATA_DATA {
14695    pub const ENCODED_LEN: usize = 182usize;
14696    pub const DEFAULT: Self = Self {
14697        flags: 0_u8,
14698        len: 0_u8,
14699        data: [0_u8; 180usize],
14700    };
14701    #[cfg(feature = "arbitrary")]
14702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14703        use arbitrary::{Arbitrary, Unstructured};
14704        let mut buf = [0u8; 1024];
14705        rng.fill_bytes(&mut buf);
14706        let mut unstructured = Unstructured::new(&buf);
14707        Self::arbitrary(&mut unstructured).unwrap_or_default()
14708    }
14709}
14710impl Default for GPS_RTCM_DATA_DATA {
14711    fn default() -> Self {
14712        Self::DEFAULT.clone()
14713    }
14714}
14715impl MessageData for GPS_RTCM_DATA_DATA {
14716    type Message = MavMessage;
14717    const ID: u32 = 233u32;
14718    const NAME: &'static str = "GPS_RTCM_DATA";
14719    const EXTRA_CRC: u8 = 35u8;
14720    const ENCODED_LEN: usize = 182usize;
14721    fn deser(
14722        _version: MavlinkVersion,
14723        __input: &[u8],
14724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14725        let avail_len = __input.len();
14726        let mut payload_buf = [0; Self::ENCODED_LEN];
14727        let mut buf = if avail_len < Self::ENCODED_LEN {
14728            payload_buf[0..avail_len].copy_from_slice(__input);
14729            Bytes::new(&payload_buf)
14730        } else {
14731            Bytes::new(__input)
14732        };
14733        let mut __struct = Self::default();
14734        __struct.flags = buf.get_u8();
14735        __struct.len = buf.get_u8();
14736        for v in &mut __struct.data {
14737            let val = buf.get_u8();
14738            *v = val;
14739        }
14740        Ok(__struct)
14741    }
14742    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14743        let mut __tmp = BytesMut::new(bytes);
14744        #[allow(clippy::absurd_extreme_comparisons)]
14745        #[allow(unused_comparisons)]
14746        if __tmp.remaining() < Self::ENCODED_LEN {
14747            panic!(
14748                "buffer is too small (need {} bytes, but got {})",
14749                Self::ENCODED_LEN,
14750                __tmp.remaining(),
14751            )
14752        }
14753        __tmp.put_u8(self.flags);
14754        __tmp.put_u8(self.len);
14755        for val in &self.data {
14756            __tmp.put_u8(*val);
14757        }
14758        if matches!(version, MavlinkVersion::V2) {
14759            let len = __tmp.len();
14760            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14761        } else {
14762            __tmp.len()
14763        }
14764    }
14765}
14766#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14767#[doc = ""]
14768#[doc = "ID: 127"]
14769#[derive(Debug, Clone, PartialEq)]
14770#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14771#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14772#[cfg_attr(feature = "ts", derive(TS))]
14773#[cfg_attr(feature = "ts", ts(export))]
14774pub struct GPS_RTK_DATA {
14775    #[doc = "Time since boot of last baseline message received."]
14776    pub time_last_baseline_ms: u32,
14777    #[doc = "GPS Time of Week of last baseline"]
14778    pub tow: u32,
14779    #[doc = "Current baseline in ECEF x or NED north component."]
14780    pub baseline_a_mm: i32,
14781    #[doc = "Current baseline in ECEF y or NED east component."]
14782    pub baseline_b_mm: i32,
14783    #[doc = "Current baseline in ECEF z or NED down component."]
14784    pub baseline_c_mm: i32,
14785    #[doc = "Current estimate of baseline accuracy."]
14786    pub accuracy: u32,
14787    #[doc = "Current number of integer ambiguity hypotheses."]
14788    pub iar_num_hypotheses: i32,
14789    #[doc = "GPS Week Number of last baseline"]
14790    pub wn: u16,
14791    #[doc = "Identification of connected RTK receiver."]
14792    pub rtk_receiver_id: u8,
14793    #[doc = "GPS-specific health report for RTK data."]
14794    pub rtk_health: u8,
14795    #[doc = "Rate of baseline messages being received by GPS"]
14796    pub rtk_rate: u8,
14797    #[doc = "Current number of sats used for RTK calculation."]
14798    pub nsats: u8,
14799    #[doc = "Coordinate system of baseline"]
14800    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14801}
14802impl GPS_RTK_DATA {
14803    pub const ENCODED_LEN: usize = 35usize;
14804    pub const DEFAULT: Self = Self {
14805        time_last_baseline_ms: 0_u32,
14806        tow: 0_u32,
14807        baseline_a_mm: 0_i32,
14808        baseline_b_mm: 0_i32,
14809        baseline_c_mm: 0_i32,
14810        accuracy: 0_u32,
14811        iar_num_hypotheses: 0_i32,
14812        wn: 0_u16,
14813        rtk_receiver_id: 0_u8,
14814        rtk_health: 0_u8,
14815        rtk_rate: 0_u8,
14816        nsats: 0_u8,
14817        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14818    };
14819    #[cfg(feature = "arbitrary")]
14820    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14821        use arbitrary::{Arbitrary, Unstructured};
14822        let mut buf = [0u8; 1024];
14823        rng.fill_bytes(&mut buf);
14824        let mut unstructured = Unstructured::new(&buf);
14825        Self::arbitrary(&mut unstructured).unwrap_or_default()
14826    }
14827}
14828impl Default for GPS_RTK_DATA {
14829    fn default() -> Self {
14830        Self::DEFAULT.clone()
14831    }
14832}
14833impl MessageData for GPS_RTK_DATA {
14834    type Message = MavMessage;
14835    const ID: u32 = 127u32;
14836    const NAME: &'static str = "GPS_RTK";
14837    const EXTRA_CRC: u8 = 25u8;
14838    const ENCODED_LEN: usize = 35usize;
14839    fn deser(
14840        _version: MavlinkVersion,
14841        __input: &[u8],
14842    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14843        let avail_len = __input.len();
14844        let mut payload_buf = [0; Self::ENCODED_LEN];
14845        let mut buf = if avail_len < Self::ENCODED_LEN {
14846            payload_buf[0..avail_len].copy_from_slice(__input);
14847            Bytes::new(&payload_buf)
14848        } else {
14849            Bytes::new(__input)
14850        };
14851        let mut __struct = Self::default();
14852        __struct.time_last_baseline_ms = buf.get_u32_le();
14853        __struct.tow = buf.get_u32_le();
14854        __struct.baseline_a_mm = buf.get_i32_le();
14855        __struct.baseline_b_mm = buf.get_i32_le();
14856        __struct.baseline_c_mm = buf.get_i32_le();
14857        __struct.accuracy = buf.get_u32_le();
14858        __struct.iar_num_hypotheses = buf.get_i32_le();
14859        __struct.wn = buf.get_u16_le();
14860        __struct.rtk_receiver_id = buf.get_u8();
14861        __struct.rtk_health = buf.get_u8();
14862        __struct.rtk_rate = buf.get_u8();
14863        __struct.nsats = buf.get_u8();
14864        let tmp = buf.get_u8();
14865        __struct.baseline_coords_type =
14866            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14867                enum_type: "RtkBaselineCoordinateSystem",
14868                value: tmp as u64,
14869            })?;
14870        Ok(__struct)
14871    }
14872    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14873        let mut __tmp = BytesMut::new(bytes);
14874        #[allow(clippy::absurd_extreme_comparisons)]
14875        #[allow(unused_comparisons)]
14876        if __tmp.remaining() < Self::ENCODED_LEN {
14877            panic!(
14878                "buffer is too small (need {} bytes, but got {})",
14879                Self::ENCODED_LEN,
14880                __tmp.remaining(),
14881            )
14882        }
14883        __tmp.put_u32_le(self.time_last_baseline_ms);
14884        __tmp.put_u32_le(self.tow);
14885        __tmp.put_i32_le(self.baseline_a_mm);
14886        __tmp.put_i32_le(self.baseline_b_mm);
14887        __tmp.put_i32_le(self.baseline_c_mm);
14888        __tmp.put_u32_le(self.accuracy);
14889        __tmp.put_i32_le(self.iar_num_hypotheses);
14890        __tmp.put_u16_le(self.wn);
14891        __tmp.put_u8(self.rtk_receiver_id);
14892        __tmp.put_u8(self.rtk_health);
14893        __tmp.put_u8(self.rtk_rate);
14894        __tmp.put_u8(self.nsats);
14895        __tmp.put_u8(self.baseline_coords_type as u8);
14896        if matches!(version, MavlinkVersion::V2) {
14897            let len = __tmp.len();
14898            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14899        } else {
14900            __tmp.len()
14901        }
14902    }
14903}
14904#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14905#[doc = ""]
14906#[doc = "ID: 25"]
14907#[derive(Debug, Clone, PartialEq)]
14908#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14909#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14910#[cfg_attr(feature = "ts", derive(TS))]
14911#[cfg_attr(feature = "ts", ts(export))]
14912pub struct GPS_STATUS_DATA {
14913    #[doc = "Number of satellites visible"]
14914    pub satellites_visible: u8,
14915    #[doc = "Global satellite ID"]
14916    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14917    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14918    pub satellite_prn: [u8; 20],
14919    #[doc = "0: Satellite not used, 1: used for localization"]
14920    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14921    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14922    pub satellite_used: [u8; 20],
14923    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14925    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14926    pub satellite_elevation: [u8; 20],
14927    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14928    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14929    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14930    pub satellite_azimuth: [u8; 20],
14931    #[doc = "Signal to noise ratio of satellite"]
14932    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14933    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14934    pub satellite_snr: [u8; 20],
14935}
14936impl GPS_STATUS_DATA {
14937    pub const ENCODED_LEN: usize = 101usize;
14938    pub const DEFAULT: Self = Self {
14939        satellites_visible: 0_u8,
14940        satellite_prn: [0_u8; 20usize],
14941        satellite_used: [0_u8; 20usize],
14942        satellite_elevation: [0_u8; 20usize],
14943        satellite_azimuth: [0_u8; 20usize],
14944        satellite_snr: [0_u8; 20usize],
14945    };
14946    #[cfg(feature = "arbitrary")]
14947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14948        use arbitrary::{Arbitrary, Unstructured};
14949        let mut buf = [0u8; 1024];
14950        rng.fill_bytes(&mut buf);
14951        let mut unstructured = Unstructured::new(&buf);
14952        Self::arbitrary(&mut unstructured).unwrap_or_default()
14953    }
14954}
14955impl Default for GPS_STATUS_DATA {
14956    fn default() -> Self {
14957        Self::DEFAULT.clone()
14958    }
14959}
14960impl MessageData for GPS_STATUS_DATA {
14961    type Message = MavMessage;
14962    const ID: u32 = 25u32;
14963    const NAME: &'static str = "GPS_STATUS";
14964    const EXTRA_CRC: u8 = 23u8;
14965    const ENCODED_LEN: usize = 101usize;
14966    fn deser(
14967        _version: MavlinkVersion,
14968        __input: &[u8],
14969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14970        let avail_len = __input.len();
14971        let mut payload_buf = [0; Self::ENCODED_LEN];
14972        let mut buf = if avail_len < Self::ENCODED_LEN {
14973            payload_buf[0..avail_len].copy_from_slice(__input);
14974            Bytes::new(&payload_buf)
14975        } else {
14976            Bytes::new(__input)
14977        };
14978        let mut __struct = Self::default();
14979        __struct.satellites_visible = buf.get_u8();
14980        for v in &mut __struct.satellite_prn {
14981            let val = buf.get_u8();
14982            *v = val;
14983        }
14984        for v in &mut __struct.satellite_used {
14985            let val = buf.get_u8();
14986            *v = val;
14987        }
14988        for v in &mut __struct.satellite_elevation {
14989            let val = buf.get_u8();
14990            *v = val;
14991        }
14992        for v in &mut __struct.satellite_azimuth {
14993            let val = buf.get_u8();
14994            *v = val;
14995        }
14996        for v in &mut __struct.satellite_snr {
14997            let val = buf.get_u8();
14998            *v = val;
14999        }
15000        Ok(__struct)
15001    }
15002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15003        let mut __tmp = BytesMut::new(bytes);
15004        #[allow(clippy::absurd_extreme_comparisons)]
15005        #[allow(unused_comparisons)]
15006        if __tmp.remaining() < Self::ENCODED_LEN {
15007            panic!(
15008                "buffer is too small (need {} bytes, but got {})",
15009                Self::ENCODED_LEN,
15010                __tmp.remaining(),
15011            )
15012        }
15013        __tmp.put_u8(self.satellites_visible);
15014        for val in &self.satellite_prn {
15015            __tmp.put_u8(*val);
15016        }
15017        for val in &self.satellite_used {
15018            __tmp.put_u8(*val);
15019        }
15020        for val in &self.satellite_elevation {
15021            __tmp.put_u8(*val);
15022        }
15023        for val in &self.satellite_azimuth {
15024            __tmp.put_u8(*val);
15025        }
15026        for val in &self.satellite_snr {
15027            __tmp.put_u8(*val);
15028        }
15029        if matches!(version, MavlinkVersion::V2) {
15030            let len = __tmp.len();
15031            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15032        } else {
15033            __tmp.len()
15034        }
15035    }
15036}
15037#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15038#[doc = ""]
15039#[doc = "ID: 0"]
15040#[derive(Debug, Clone, PartialEq)]
15041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15042#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15043#[cfg_attr(feature = "ts", derive(TS))]
15044#[cfg_attr(feature = "ts", ts(export))]
15045pub struct HEARTBEAT_DATA {
15046    #[doc = "A bitfield for use for autopilot-specific flags"]
15047    pub custom_mode: u32,
15048    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15049    pub mavtype: MavType,
15050    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15051    pub autopilot: MavAutopilot,
15052    #[doc = "System mode bitmap."]
15053    pub base_mode: MavModeFlag,
15054    #[doc = "System status flag."]
15055    pub system_status: MavState,
15056    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15057    pub mavlink_version: u8,
15058}
15059impl HEARTBEAT_DATA {
15060    pub const ENCODED_LEN: usize = 9usize;
15061    pub const DEFAULT: Self = Self {
15062        custom_mode: 0_u32,
15063        mavtype: MavType::DEFAULT,
15064        autopilot: MavAutopilot::DEFAULT,
15065        base_mode: MavModeFlag::DEFAULT,
15066        system_status: MavState::DEFAULT,
15067        mavlink_version: MINOR_MAVLINK_VERSION,
15068    };
15069    #[cfg(feature = "arbitrary")]
15070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15071        use arbitrary::{Arbitrary, Unstructured};
15072        let mut buf = [0u8; 1024];
15073        rng.fill_bytes(&mut buf);
15074        let mut unstructured = Unstructured::new(&buf);
15075        Self::arbitrary(&mut unstructured).unwrap_or_default()
15076    }
15077}
15078impl Default for HEARTBEAT_DATA {
15079    fn default() -> Self {
15080        Self::DEFAULT.clone()
15081    }
15082}
15083impl MessageData for HEARTBEAT_DATA {
15084    type Message = MavMessage;
15085    const ID: u32 = 0u32;
15086    const NAME: &'static str = "HEARTBEAT";
15087    const EXTRA_CRC: u8 = 50u8;
15088    const ENCODED_LEN: usize = 9usize;
15089    fn deser(
15090        _version: MavlinkVersion,
15091        __input: &[u8],
15092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15093        let avail_len = __input.len();
15094        let mut payload_buf = [0; Self::ENCODED_LEN];
15095        let mut buf = if avail_len < Self::ENCODED_LEN {
15096            payload_buf[0..avail_len].copy_from_slice(__input);
15097            Bytes::new(&payload_buf)
15098        } else {
15099            Bytes::new(__input)
15100        };
15101        let mut __struct = Self::default();
15102        __struct.custom_mode = buf.get_u32_le();
15103        let tmp = buf.get_u8();
15104        __struct.mavtype =
15105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15106                enum_type: "MavType",
15107                value: tmp as u64,
15108            })?;
15109        let tmp = buf.get_u8();
15110        __struct.autopilot =
15111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15112                enum_type: "MavAutopilot",
15113                value: tmp as u64,
15114            })?;
15115        let tmp = buf.get_u8();
15116        __struct.base_mode =
15117            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15118                flag_type: "MavModeFlag",
15119                value: tmp as u64,
15120            })?;
15121        let tmp = buf.get_u8();
15122        __struct.system_status =
15123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15124                enum_type: "MavState",
15125                value: tmp as u64,
15126            })?;
15127        __struct.mavlink_version = buf.get_u8();
15128        Ok(__struct)
15129    }
15130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15131        let mut __tmp = BytesMut::new(bytes);
15132        #[allow(clippy::absurd_extreme_comparisons)]
15133        #[allow(unused_comparisons)]
15134        if __tmp.remaining() < Self::ENCODED_LEN {
15135            panic!(
15136                "buffer is too small (need {} bytes, but got {})",
15137                Self::ENCODED_LEN,
15138                __tmp.remaining(),
15139            )
15140        }
15141        __tmp.put_u32_le(self.custom_mode);
15142        __tmp.put_u8(self.mavtype as u8);
15143        __tmp.put_u8(self.autopilot as u8);
15144        __tmp.put_u8(self.base_mode.bits());
15145        __tmp.put_u8(self.system_status as u8);
15146        __tmp.put_u8(self.mavlink_version);
15147        if matches!(version, MavlinkVersion::V2) {
15148            let len = __tmp.len();
15149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15150        } else {
15151            __tmp.len()
15152        }
15153    }
15154}
15155#[doc = "Herelink Telemetry."]
15156#[doc = ""]
15157#[doc = "ID: 50003"]
15158#[derive(Debug, Clone, PartialEq)]
15159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15161#[cfg_attr(feature = "ts", derive(TS))]
15162#[cfg_attr(feature = "ts", ts(export))]
15163pub struct HERELINK_TELEM_DATA {
15164    pub rf_freq: u32,
15165    pub link_bw: u32,
15166    pub link_rate: u32,
15167    pub snr: i16,
15168    pub cpu_temp: i16,
15169    pub board_temp: i16,
15170    pub rssi: u8,
15171}
15172impl HERELINK_TELEM_DATA {
15173    pub const ENCODED_LEN: usize = 19usize;
15174    pub const DEFAULT: Self = Self {
15175        rf_freq: 0_u32,
15176        link_bw: 0_u32,
15177        link_rate: 0_u32,
15178        snr: 0_i16,
15179        cpu_temp: 0_i16,
15180        board_temp: 0_i16,
15181        rssi: 0_u8,
15182    };
15183    #[cfg(feature = "arbitrary")]
15184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15185        use arbitrary::{Arbitrary, Unstructured};
15186        let mut buf = [0u8; 1024];
15187        rng.fill_bytes(&mut buf);
15188        let mut unstructured = Unstructured::new(&buf);
15189        Self::arbitrary(&mut unstructured).unwrap_or_default()
15190    }
15191}
15192impl Default for HERELINK_TELEM_DATA {
15193    fn default() -> Self {
15194        Self::DEFAULT.clone()
15195    }
15196}
15197impl MessageData for HERELINK_TELEM_DATA {
15198    type Message = MavMessage;
15199    const ID: u32 = 50003u32;
15200    const NAME: &'static str = "HERELINK_TELEM";
15201    const EXTRA_CRC: u8 = 62u8;
15202    const ENCODED_LEN: usize = 19usize;
15203    fn deser(
15204        _version: MavlinkVersion,
15205        __input: &[u8],
15206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15207        let avail_len = __input.len();
15208        let mut payload_buf = [0; Self::ENCODED_LEN];
15209        let mut buf = if avail_len < Self::ENCODED_LEN {
15210            payload_buf[0..avail_len].copy_from_slice(__input);
15211            Bytes::new(&payload_buf)
15212        } else {
15213            Bytes::new(__input)
15214        };
15215        let mut __struct = Self::default();
15216        __struct.rf_freq = buf.get_u32_le();
15217        __struct.link_bw = buf.get_u32_le();
15218        __struct.link_rate = buf.get_u32_le();
15219        __struct.snr = buf.get_i16_le();
15220        __struct.cpu_temp = buf.get_i16_le();
15221        __struct.board_temp = buf.get_i16_le();
15222        __struct.rssi = buf.get_u8();
15223        Ok(__struct)
15224    }
15225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15226        let mut __tmp = BytesMut::new(bytes);
15227        #[allow(clippy::absurd_extreme_comparisons)]
15228        #[allow(unused_comparisons)]
15229        if __tmp.remaining() < Self::ENCODED_LEN {
15230            panic!(
15231                "buffer is too small (need {} bytes, but got {})",
15232                Self::ENCODED_LEN,
15233                __tmp.remaining(),
15234            )
15235        }
15236        __tmp.put_u32_le(self.rf_freq);
15237        __tmp.put_u32_le(self.link_bw);
15238        __tmp.put_u32_le(self.link_rate);
15239        __tmp.put_i16_le(self.snr);
15240        __tmp.put_i16_le(self.cpu_temp);
15241        __tmp.put_i16_le(self.board_temp);
15242        __tmp.put_u8(self.rssi);
15243        if matches!(version, MavlinkVersion::V2) {
15244            let len = __tmp.len();
15245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15246        } else {
15247            __tmp.len()
15248        }
15249    }
15250}
15251#[doc = "Information about video stream."]
15252#[doc = ""]
15253#[doc = "ID: 50002"]
15254#[derive(Debug, Clone, PartialEq)]
15255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15257#[cfg_attr(feature = "ts", derive(TS))]
15258#[cfg_attr(feature = "ts", ts(export))]
15259pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15260    #[doc = "Frame rate."]
15261    pub framerate: f32,
15262    #[doc = "Bit rate."]
15263    pub bitrate: u32,
15264    #[doc = "Horizontal resolution."]
15265    pub resolution_h: u16,
15266    #[doc = "Vertical resolution."]
15267    pub resolution_v: u16,
15268    #[doc = "Video image rotation clockwise."]
15269    pub rotation: u16,
15270    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
15271    pub camera_id: u8,
15272    #[doc = "Number of streams available."]
15273    pub status: u8,
15274    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
15275    #[cfg_attr(feature = "ts", ts(type = "string"))]
15276    pub uri: CharArray<230>,
15277}
15278impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15279    pub const ENCODED_LEN: usize = 246usize;
15280    pub const DEFAULT: Self = Self {
15281        framerate: 0.0_f32,
15282        bitrate: 0_u32,
15283        resolution_h: 0_u16,
15284        resolution_v: 0_u16,
15285        rotation: 0_u16,
15286        camera_id: 0_u8,
15287        status: 0_u8,
15288        uri: CharArray::new([0_u8; 230usize]),
15289    };
15290    #[cfg(feature = "arbitrary")]
15291    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15292        use arbitrary::{Arbitrary, Unstructured};
15293        let mut buf = [0u8; 1024];
15294        rng.fill_bytes(&mut buf);
15295        let mut unstructured = Unstructured::new(&buf);
15296        Self::arbitrary(&mut unstructured).unwrap_or_default()
15297    }
15298}
15299impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15300    fn default() -> Self {
15301        Self::DEFAULT.clone()
15302    }
15303}
15304impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
15305    type Message = MavMessage;
15306    const ID: u32 = 50002u32;
15307    const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
15308    const EXTRA_CRC: u8 = 181u8;
15309    const ENCODED_LEN: usize = 246usize;
15310    fn deser(
15311        _version: MavlinkVersion,
15312        __input: &[u8],
15313    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15314        let avail_len = __input.len();
15315        let mut payload_buf = [0; Self::ENCODED_LEN];
15316        let mut buf = if avail_len < Self::ENCODED_LEN {
15317            payload_buf[0..avail_len].copy_from_slice(__input);
15318            Bytes::new(&payload_buf)
15319        } else {
15320            Bytes::new(__input)
15321        };
15322        let mut __struct = Self::default();
15323        __struct.framerate = buf.get_f32_le();
15324        __struct.bitrate = buf.get_u32_le();
15325        __struct.resolution_h = buf.get_u16_le();
15326        __struct.resolution_v = buf.get_u16_le();
15327        __struct.rotation = buf.get_u16_le();
15328        __struct.camera_id = buf.get_u8();
15329        __struct.status = buf.get_u8();
15330        let mut tmp = [0_u8; 230usize];
15331        for v in &mut tmp {
15332            *v = buf.get_u8();
15333        }
15334        __struct.uri = CharArray::new(tmp);
15335        Ok(__struct)
15336    }
15337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15338        let mut __tmp = BytesMut::new(bytes);
15339        #[allow(clippy::absurd_extreme_comparisons)]
15340        #[allow(unused_comparisons)]
15341        if __tmp.remaining() < Self::ENCODED_LEN {
15342            panic!(
15343                "buffer is too small (need {} bytes, but got {})",
15344                Self::ENCODED_LEN,
15345                __tmp.remaining(),
15346            )
15347        }
15348        __tmp.put_f32_le(self.framerate);
15349        __tmp.put_u32_le(self.bitrate);
15350        __tmp.put_u16_le(self.resolution_h);
15351        __tmp.put_u16_le(self.resolution_v);
15352        __tmp.put_u16_le(self.rotation);
15353        __tmp.put_u8(self.camera_id);
15354        __tmp.put_u8(self.status);
15355        for val in &self.uri {
15356            __tmp.put_u8(*val);
15357        }
15358        if matches!(version, MavlinkVersion::V2) {
15359            let len = __tmp.len();
15360            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15361        } else {
15362            __tmp.len()
15363        }
15364    }
15365}
15366#[doc = "The IMU readings in SI units in NED body frame."]
15367#[doc = ""]
15368#[doc = "ID: 105"]
15369#[derive(Debug, Clone, PartialEq)]
15370#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15371#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15372#[cfg_attr(feature = "ts", derive(TS))]
15373#[cfg_attr(feature = "ts", ts(export))]
15374pub struct HIGHRES_IMU_DATA {
15375    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15376    pub time_usec: u64,
15377    #[doc = "X acceleration"]
15378    pub xacc: f32,
15379    #[doc = "Y acceleration"]
15380    pub yacc: f32,
15381    #[doc = "Z acceleration"]
15382    pub zacc: f32,
15383    #[doc = "Angular speed around X axis"]
15384    pub xgyro: f32,
15385    #[doc = "Angular speed around Y axis"]
15386    pub ygyro: f32,
15387    #[doc = "Angular speed around Z axis"]
15388    pub zgyro: f32,
15389    #[doc = "X Magnetic field"]
15390    pub xmag: f32,
15391    #[doc = "Y Magnetic field"]
15392    pub ymag: f32,
15393    #[doc = "Z Magnetic field"]
15394    pub zmag: f32,
15395    #[doc = "Absolute pressure"]
15396    pub abs_pressure: f32,
15397    #[doc = "Differential pressure"]
15398    pub diff_pressure: f32,
15399    #[doc = "Altitude calculated from pressure"]
15400    pub pressure_alt: f32,
15401    #[doc = "Temperature"]
15402    pub temperature: f32,
15403    #[doc = "Bitmap for fields that have updated since last message"]
15404    pub fields_updated: HighresImuUpdatedFlags,
15405    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15407    pub id: u8,
15408}
15409impl HIGHRES_IMU_DATA {
15410    pub const ENCODED_LEN: usize = 63usize;
15411    pub const DEFAULT: Self = Self {
15412        time_usec: 0_u64,
15413        xacc: 0.0_f32,
15414        yacc: 0.0_f32,
15415        zacc: 0.0_f32,
15416        xgyro: 0.0_f32,
15417        ygyro: 0.0_f32,
15418        zgyro: 0.0_f32,
15419        xmag: 0.0_f32,
15420        ymag: 0.0_f32,
15421        zmag: 0.0_f32,
15422        abs_pressure: 0.0_f32,
15423        diff_pressure: 0.0_f32,
15424        pressure_alt: 0.0_f32,
15425        temperature: 0.0_f32,
15426        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15427        id: 0_u8,
15428    };
15429    #[cfg(feature = "arbitrary")]
15430    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15431        use arbitrary::{Arbitrary, Unstructured};
15432        let mut buf = [0u8; 1024];
15433        rng.fill_bytes(&mut buf);
15434        let mut unstructured = Unstructured::new(&buf);
15435        Self::arbitrary(&mut unstructured).unwrap_or_default()
15436    }
15437}
15438impl Default for HIGHRES_IMU_DATA {
15439    fn default() -> Self {
15440        Self::DEFAULT.clone()
15441    }
15442}
15443impl MessageData for HIGHRES_IMU_DATA {
15444    type Message = MavMessage;
15445    const ID: u32 = 105u32;
15446    const NAME: &'static str = "HIGHRES_IMU";
15447    const EXTRA_CRC: u8 = 93u8;
15448    const ENCODED_LEN: usize = 63usize;
15449    fn deser(
15450        _version: MavlinkVersion,
15451        __input: &[u8],
15452    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15453        let avail_len = __input.len();
15454        let mut payload_buf = [0; Self::ENCODED_LEN];
15455        let mut buf = if avail_len < Self::ENCODED_LEN {
15456            payload_buf[0..avail_len].copy_from_slice(__input);
15457            Bytes::new(&payload_buf)
15458        } else {
15459            Bytes::new(__input)
15460        };
15461        let mut __struct = Self::default();
15462        __struct.time_usec = buf.get_u64_le();
15463        __struct.xacc = buf.get_f32_le();
15464        __struct.yacc = buf.get_f32_le();
15465        __struct.zacc = buf.get_f32_le();
15466        __struct.xgyro = buf.get_f32_le();
15467        __struct.ygyro = buf.get_f32_le();
15468        __struct.zgyro = buf.get_f32_le();
15469        __struct.xmag = buf.get_f32_le();
15470        __struct.ymag = buf.get_f32_le();
15471        __struct.zmag = buf.get_f32_le();
15472        __struct.abs_pressure = buf.get_f32_le();
15473        __struct.diff_pressure = buf.get_f32_le();
15474        __struct.pressure_alt = buf.get_f32_le();
15475        __struct.temperature = buf.get_f32_le();
15476        let tmp = buf.get_u16_le();
15477        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(tmp).ok_or(
15478            ::mavlink_core::error::ParserError::InvalidFlag {
15479                flag_type: "HighresImuUpdatedFlags",
15480                value: tmp as u64,
15481            },
15482        )?;
15483        __struct.id = buf.get_u8();
15484        Ok(__struct)
15485    }
15486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15487        let mut __tmp = BytesMut::new(bytes);
15488        #[allow(clippy::absurd_extreme_comparisons)]
15489        #[allow(unused_comparisons)]
15490        if __tmp.remaining() < Self::ENCODED_LEN {
15491            panic!(
15492                "buffer is too small (need {} bytes, but got {})",
15493                Self::ENCODED_LEN,
15494                __tmp.remaining(),
15495            )
15496        }
15497        __tmp.put_u64_le(self.time_usec);
15498        __tmp.put_f32_le(self.xacc);
15499        __tmp.put_f32_le(self.yacc);
15500        __tmp.put_f32_le(self.zacc);
15501        __tmp.put_f32_le(self.xgyro);
15502        __tmp.put_f32_le(self.ygyro);
15503        __tmp.put_f32_le(self.zgyro);
15504        __tmp.put_f32_le(self.xmag);
15505        __tmp.put_f32_le(self.ymag);
15506        __tmp.put_f32_le(self.zmag);
15507        __tmp.put_f32_le(self.abs_pressure);
15508        __tmp.put_f32_le(self.diff_pressure);
15509        __tmp.put_f32_le(self.pressure_alt);
15510        __tmp.put_f32_le(self.temperature);
15511        __tmp.put_u16_le(self.fields_updated.bits());
15512        if matches!(version, MavlinkVersion::V2) {
15513            __tmp.put_u8(self.id);
15514            let len = __tmp.len();
15515            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15516        } else {
15517            __tmp.len()
15518        }
15519    }
15520}
15521#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15522#[doc = "Message appropriate for high latency connections like Iridium."]
15523#[doc = ""]
15524#[doc = "ID: 234"]
15525#[derive(Debug, Clone, PartialEq)]
15526#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15527#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15528#[cfg_attr(feature = "ts", derive(TS))]
15529#[cfg_attr(feature = "ts", ts(export))]
15530pub struct HIGH_LATENCY_DATA {
15531    #[doc = "A bitfield for use for autopilot-specific flags."]
15532    pub custom_mode: u32,
15533    #[doc = "Latitude"]
15534    pub latitude: i32,
15535    #[doc = "Longitude"]
15536    pub longitude: i32,
15537    #[doc = "roll"]
15538    pub roll: i16,
15539    #[doc = "pitch"]
15540    pub pitch: i16,
15541    #[doc = "heading"]
15542    pub heading: u16,
15543    #[doc = "heading setpoint"]
15544    pub heading_sp: i16,
15545    #[doc = "Altitude above mean sea level"]
15546    pub altitude_amsl: i16,
15547    #[doc = "Altitude setpoint relative to the home position"]
15548    pub altitude_sp: i16,
15549    #[doc = "distance to target"]
15550    pub wp_distance: u16,
15551    #[doc = "Bitmap of enabled system modes."]
15552    pub base_mode: MavModeFlag,
15553    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15554    pub landed_state: MavLandedState,
15555    #[doc = "throttle (percentage)"]
15556    pub throttle: i8,
15557    #[doc = "airspeed"]
15558    pub airspeed: u8,
15559    #[doc = "airspeed setpoint"]
15560    pub airspeed_sp: u8,
15561    #[doc = "groundspeed"]
15562    pub groundspeed: u8,
15563    #[doc = "climb rate"]
15564    pub climb_rate: i8,
15565    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15566    pub gps_nsat: u8,
15567    #[doc = "GPS Fix type."]
15568    pub gps_fix_type: GpsFixType,
15569    #[doc = "Remaining battery (percentage)"]
15570    pub battery_remaining: u8,
15571    #[doc = "Autopilot temperature (degrees C)"]
15572    pub temperature: i8,
15573    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15574    pub temperature_air: i8,
15575    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15576    pub failsafe: u8,
15577    #[doc = "current waypoint number"]
15578    pub wp_num: u8,
15579}
15580impl HIGH_LATENCY_DATA {
15581    pub const ENCODED_LEN: usize = 40usize;
15582    pub const DEFAULT: Self = Self {
15583        custom_mode: 0_u32,
15584        latitude: 0_i32,
15585        longitude: 0_i32,
15586        roll: 0_i16,
15587        pitch: 0_i16,
15588        heading: 0_u16,
15589        heading_sp: 0_i16,
15590        altitude_amsl: 0_i16,
15591        altitude_sp: 0_i16,
15592        wp_distance: 0_u16,
15593        base_mode: MavModeFlag::DEFAULT,
15594        landed_state: MavLandedState::DEFAULT,
15595        throttle: 0_i8,
15596        airspeed: 0_u8,
15597        airspeed_sp: 0_u8,
15598        groundspeed: 0_u8,
15599        climb_rate: 0_i8,
15600        gps_nsat: 0_u8,
15601        gps_fix_type: GpsFixType::DEFAULT,
15602        battery_remaining: 0_u8,
15603        temperature: 0_i8,
15604        temperature_air: 0_i8,
15605        failsafe: 0_u8,
15606        wp_num: 0_u8,
15607    };
15608    #[cfg(feature = "arbitrary")]
15609    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15610        use arbitrary::{Arbitrary, Unstructured};
15611        let mut buf = [0u8; 1024];
15612        rng.fill_bytes(&mut buf);
15613        let mut unstructured = Unstructured::new(&buf);
15614        Self::arbitrary(&mut unstructured).unwrap_or_default()
15615    }
15616}
15617impl Default for HIGH_LATENCY_DATA {
15618    fn default() -> Self {
15619        Self::DEFAULT.clone()
15620    }
15621}
15622impl MessageData for HIGH_LATENCY_DATA {
15623    type Message = MavMessage;
15624    const ID: u32 = 234u32;
15625    const NAME: &'static str = "HIGH_LATENCY";
15626    const EXTRA_CRC: u8 = 150u8;
15627    const ENCODED_LEN: usize = 40usize;
15628    fn deser(
15629        _version: MavlinkVersion,
15630        __input: &[u8],
15631    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15632        let avail_len = __input.len();
15633        let mut payload_buf = [0; Self::ENCODED_LEN];
15634        let mut buf = if avail_len < Self::ENCODED_LEN {
15635            payload_buf[0..avail_len].copy_from_slice(__input);
15636            Bytes::new(&payload_buf)
15637        } else {
15638            Bytes::new(__input)
15639        };
15640        let mut __struct = Self::default();
15641        __struct.custom_mode = buf.get_u32_le();
15642        __struct.latitude = buf.get_i32_le();
15643        __struct.longitude = buf.get_i32_le();
15644        __struct.roll = buf.get_i16_le();
15645        __struct.pitch = buf.get_i16_le();
15646        __struct.heading = buf.get_u16_le();
15647        __struct.heading_sp = buf.get_i16_le();
15648        __struct.altitude_amsl = buf.get_i16_le();
15649        __struct.altitude_sp = buf.get_i16_le();
15650        __struct.wp_distance = buf.get_u16_le();
15651        let tmp = buf.get_u8();
15652        __struct.base_mode =
15653            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15654                flag_type: "MavModeFlag",
15655                value: tmp as u64,
15656            })?;
15657        let tmp = buf.get_u8();
15658        __struct.landed_state =
15659            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15660                enum_type: "MavLandedState",
15661                value: tmp as u64,
15662            })?;
15663        __struct.throttle = buf.get_i8();
15664        __struct.airspeed = buf.get_u8();
15665        __struct.airspeed_sp = buf.get_u8();
15666        __struct.groundspeed = buf.get_u8();
15667        __struct.climb_rate = buf.get_i8();
15668        __struct.gps_nsat = buf.get_u8();
15669        let tmp = buf.get_u8();
15670        __struct.gps_fix_type =
15671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15672                enum_type: "GpsFixType",
15673                value: tmp as u64,
15674            })?;
15675        __struct.battery_remaining = buf.get_u8();
15676        __struct.temperature = buf.get_i8();
15677        __struct.temperature_air = buf.get_i8();
15678        __struct.failsafe = buf.get_u8();
15679        __struct.wp_num = buf.get_u8();
15680        Ok(__struct)
15681    }
15682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15683        let mut __tmp = BytesMut::new(bytes);
15684        #[allow(clippy::absurd_extreme_comparisons)]
15685        #[allow(unused_comparisons)]
15686        if __tmp.remaining() < Self::ENCODED_LEN {
15687            panic!(
15688                "buffer is too small (need {} bytes, but got {})",
15689                Self::ENCODED_LEN,
15690                __tmp.remaining(),
15691            )
15692        }
15693        __tmp.put_u32_le(self.custom_mode);
15694        __tmp.put_i32_le(self.latitude);
15695        __tmp.put_i32_le(self.longitude);
15696        __tmp.put_i16_le(self.roll);
15697        __tmp.put_i16_le(self.pitch);
15698        __tmp.put_u16_le(self.heading);
15699        __tmp.put_i16_le(self.heading_sp);
15700        __tmp.put_i16_le(self.altitude_amsl);
15701        __tmp.put_i16_le(self.altitude_sp);
15702        __tmp.put_u16_le(self.wp_distance);
15703        __tmp.put_u8(self.base_mode.bits());
15704        __tmp.put_u8(self.landed_state as u8);
15705        __tmp.put_i8(self.throttle);
15706        __tmp.put_u8(self.airspeed);
15707        __tmp.put_u8(self.airspeed_sp);
15708        __tmp.put_u8(self.groundspeed);
15709        __tmp.put_i8(self.climb_rate);
15710        __tmp.put_u8(self.gps_nsat);
15711        __tmp.put_u8(self.gps_fix_type as u8);
15712        __tmp.put_u8(self.battery_remaining);
15713        __tmp.put_i8(self.temperature);
15714        __tmp.put_i8(self.temperature_air);
15715        __tmp.put_u8(self.failsafe);
15716        __tmp.put_u8(self.wp_num);
15717        if matches!(version, MavlinkVersion::V2) {
15718            let len = __tmp.len();
15719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15720        } else {
15721            __tmp.len()
15722        }
15723    }
15724}
15725#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15726#[doc = ""]
15727#[doc = "ID: 235"]
15728#[derive(Debug, Clone, PartialEq)]
15729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15731#[cfg_attr(feature = "ts", derive(TS))]
15732#[cfg_attr(feature = "ts", ts(export))]
15733pub struct HIGH_LATENCY2_DATA {
15734    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15735    pub timestamp: u32,
15736    #[doc = "Latitude"]
15737    pub latitude: i32,
15738    #[doc = "Longitude"]
15739    pub longitude: i32,
15740    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15741    pub custom_mode: u16,
15742    #[doc = "Altitude above mean sea level"]
15743    pub altitude: i16,
15744    #[doc = "Altitude setpoint"]
15745    pub target_altitude: i16,
15746    #[doc = "Distance to target waypoint or position"]
15747    pub target_distance: u16,
15748    #[doc = "Current waypoint number"]
15749    pub wp_num: u16,
15750    #[doc = "Bitmap of failure flags."]
15751    pub failure_flags: HlFailureFlag,
15752    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15753    pub mavtype: MavType,
15754    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15755    pub autopilot: MavAutopilot,
15756    #[doc = "Heading"]
15757    pub heading: u8,
15758    #[doc = "Heading setpoint"]
15759    pub target_heading: u8,
15760    #[doc = "Throttle"]
15761    pub throttle: u8,
15762    #[doc = "Airspeed"]
15763    pub airspeed: u8,
15764    #[doc = "Airspeed setpoint"]
15765    pub airspeed_sp: u8,
15766    #[doc = "Groundspeed"]
15767    pub groundspeed: u8,
15768    #[doc = "Windspeed"]
15769    pub windspeed: u8,
15770    #[doc = "Wind heading"]
15771    pub wind_heading: u8,
15772    #[doc = "Maximum error horizontal position since last message"]
15773    pub eph: u8,
15774    #[doc = "Maximum error vertical position since last message"]
15775    pub epv: u8,
15776    #[doc = "Air temperature"]
15777    pub temperature_air: i8,
15778    #[doc = "Maximum climb rate magnitude since last message"]
15779    pub climb_rate: i8,
15780    #[doc = "Battery level (-1 if field not provided)."]
15781    pub battery: i8,
15782    #[doc = "Field for custom payload."]
15783    pub custom0: i8,
15784    #[doc = "Field for custom payload."]
15785    pub custom1: i8,
15786    #[doc = "Field for custom payload."]
15787    pub custom2: i8,
15788}
15789impl HIGH_LATENCY2_DATA {
15790    pub const ENCODED_LEN: usize = 42usize;
15791    pub const DEFAULT: Self = Self {
15792        timestamp: 0_u32,
15793        latitude: 0_i32,
15794        longitude: 0_i32,
15795        custom_mode: 0_u16,
15796        altitude: 0_i16,
15797        target_altitude: 0_i16,
15798        target_distance: 0_u16,
15799        wp_num: 0_u16,
15800        failure_flags: HlFailureFlag::DEFAULT,
15801        mavtype: MavType::DEFAULT,
15802        autopilot: MavAutopilot::DEFAULT,
15803        heading: 0_u8,
15804        target_heading: 0_u8,
15805        throttle: 0_u8,
15806        airspeed: 0_u8,
15807        airspeed_sp: 0_u8,
15808        groundspeed: 0_u8,
15809        windspeed: 0_u8,
15810        wind_heading: 0_u8,
15811        eph: 0_u8,
15812        epv: 0_u8,
15813        temperature_air: 0_i8,
15814        climb_rate: 0_i8,
15815        battery: 0_i8,
15816        custom0: 0_i8,
15817        custom1: 0_i8,
15818        custom2: 0_i8,
15819    };
15820    #[cfg(feature = "arbitrary")]
15821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15822        use arbitrary::{Arbitrary, Unstructured};
15823        let mut buf = [0u8; 1024];
15824        rng.fill_bytes(&mut buf);
15825        let mut unstructured = Unstructured::new(&buf);
15826        Self::arbitrary(&mut unstructured).unwrap_or_default()
15827    }
15828}
15829impl Default for HIGH_LATENCY2_DATA {
15830    fn default() -> Self {
15831        Self::DEFAULT.clone()
15832    }
15833}
15834impl MessageData for HIGH_LATENCY2_DATA {
15835    type Message = MavMessage;
15836    const ID: u32 = 235u32;
15837    const NAME: &'static str = "HIGH_LATENCY2";
15838    const EXTRA_CRC: u8 = 179u8;
15839    const ENCODED_LEN: usize = 42usize;
15840    fn deser(
15841        _version: MavlinkVersion,
15842        __input: &[u8],
15843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15844        let avail_len = __input.len();
15845        let mut payload_buf = [0; Self::ENCODED_LEN];
15846        let mut buf = if avail_len < Self::ENCODED_LEN {
15847            payload_buf[0..avail_len].copy_from_slice(__input);
15848            Bytes::new(&payload_buf)
15849        } else {
15850            Bytes::new(__input)
15851        };
15852        let mut __struct = Self::default();
15853        __struct.timestamp = buf.get_u32_le();
15854        __struct.latitude = buf.get_i32_le();
15855        __struct.longitude = buf.get_i32_le();
15856        __struct.custom_mode = buf.get_u16_le();
15857        __struct.altitude = buf.get_i16_le();
15858        __struct.target_altitude = buf.get_i16_le();
15859        __struct.target_distance = buf.get_u16_le();
15860        __struct.wp_num = buf.get_u16_le();
15861        let tmp = buf.get_u16_le();
15862        __struct.failure_flags = HlFailureFlag::from_bits(tmp).ok_or(
15863            ::mavlink_core::error::ParserError::InvalidFlag {
15864                flag_type: "HlFailureFlag",
15865                value: tmp as u64,
15866            },
15867        )?;
15868        let tmp = buf.get_u8();
15869        __struct.mavtype =
15870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15871                enum_type: "MavType",
15872                value: tmp as u64,
15873            })?;
15874        let tmp = buf.get_u8();
15875        __struct.autopilot =
15876            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15877                enum_type: "MavAutopilot",
15878                value: tmp as u64,
15879            })?;
15880        __struct.heading = buf.get_u8();
15881        __struct.target_heading = buf.get_u8();
15882        __struct.throttle = buf.get_u8();
15883        __struct.airspeed = buf.get_u8();
15884        __struct.airspeed_sp = buf.get_u8();
15885        __struct.groundspeed = buf.get_u8();
15886        __struct.windspeed = buf.get_u8();
15887        __struct.wind_heading = buf.get_u8();
15888        __struct.eph = buf.get_u8();
15889        __struct.epv = buf.get_u8();
15890        __struct.temperature_air = buf.get_i8();
15891        __struct.climb_rate = buf.get_i8();
15892        __struct.battery = buf.get_i8();
15893        __struct.custom0 = buf.get_i8();
15894        __struct.custom1 = buf.get_i8();
15895        __struct.custom2 = buf.get_i8();
15896        Ok(__struct)
15897    }
15898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15899        let mut __tmp = BytesMut::new(bytes);
15900        #[allow(clippy::absurd_extreme_comparisons)]
15901        #[allow(unused_comparisons)]
15902        if __tmp.remaining() < Self::ENCODED_LEN {
15903            panic!(
15904                "buffer is too small (need {} bytes, but got {})",
15905                Self::ENCODED_LEN,
15906                __tmp.remaining(),
15907            )
15908        }
15909        __tmp.put_u32_le(self.timestamp);
15910        __tmp.put_i32_le(self.latitude);
15911        __tmp.put_i32_le(self.longitude);
15912        __tmp.put_u16_le(self.custom_mode);
15913        __tmp.put_i16_le(self.altitude);
15914        __tmp.put_i16_le(self.target_altitude);
15915        __tmp.put_u16_le(self.target_distance);
15916        __tmp.put_u16_le(self.wp_num);
15917        __tmp.put_u16_le(self.failure_flags.bits());
15918        __tmp.put_u8(self.mavtype as u8);
15919        __tmp.put_u8(self.autopilot as u8);
15920        __tmp.put_u8(self.heading);
15921        __tmp.put_u8(self.target_heading);
15922        __tmp.put_u8(self.throttle);
15923        __tmp.put_u8(self.airspeed);
15924        __tmp.put_u8(self.airspeed_sp);
15925        __tmp.put_u8(self.groundspeed);
15926        __tmp.put_u8(self.windspeed);
15927        __tmp.put_u8(self.wind_heading);
15928        __tmp.put_u8(self.eph);
15929        __tmp.put_u8(self.epv);
15930        __tmp.put_i8(self.temperature_air);
15931        __tmp.put_i8(self.climb_rate);
15932        __tmp.put_i8(self.battery);
15933        __tmp.put_i8(self.custom0);
15934        __tmp.put_i8(self.custom1);
15935        __tmp.put_i8(self.custom2);
15936        if matches!(version, MavlinkVersion::V2) {
15937            let len = __tmp.len();
15938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15939        } else {
15940            __tmp.len()
15941        }
15942    }
15943}
15944#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15945#[doc = ""]
15946#[doc = "ID: 93"]
15947#[derive(Debug, Clone, PartialEq)]
15948#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15949#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15950#[cfg_attr(feature = "ts", derive(TS))]
15951#[cfg_attr(feature = "ts", ts(export))]
15952pub struct HIL_ACTUATOR_CONTROLS_DATA {
15953    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15954    pub time_usec: u64,
15955    #[doc = "Flags bitmask."]
15956    pub flags: HilActuatorControlsFlags,
15957    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15959    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15960    pub controls: [f32; 16],
15961    #[doc = "System mode. Includes arming state."]
15962    pub mode: MavModeFlag,
15963}
15964impl HIL_ACTUATOR_CONTROLS_DATA {
15965    pub const ENCODED_LEN: usize = 81usize;
15966    pub const DEFAULT: Self = Self {
15967        time_usec: 0_u64,
15968        flags: HilActuatorControlsFlags::DEFAULT,
15969        controls: [0.0_f32; 16usize],
15970        mode: MavModeFlag::DEFAULT,
15971    };
15972    #[cfg(feature = "arbitrary")]
15973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15974        use arbitrary::{Arbitrary, Unstructured};
15975        let mut buf = [0u8; 1024];
15976        rng.fill_bytes(&mut buf);
15977        let mut unstructured = Unstructured::new(&buf);
15978        Self::arbitrary(&mut unstructured).unwrap_or_default()
15979    }
15980}
15981impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15982    fn default() -> Self {
15983        Self::DEFAULT.clone()
15984    }
15985}
15986impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15987    type Message = MavMessage;
15988    const ID: u32 = 93u32;
15989    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15990    const EXTRA_CRC: u8 = 47u8;
15991    const ENCODED_LEN: usize = 81usize;
15992    fn deser(
15993        _version: MavlinkVersion,
15994        __input: &[u8],
15995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15996        let avail_len = __input.len();
15997        let mut payload_buf = [0; Self::ENCODED_LEN];
15998        let mut buf = if avail_len < Self::ENCODED_LEN {
15999            payload_buf[0..avail_len].copy_from_slice(__input);
16000            Bytes::new(&payload_buf)
16001        } else {
16002            Bytes::new(__input)
16003        };
16004        let mut __struct = Self::default();
16005        __struct.time_usec = buf.get_u64_le();
16006        let tmp = buf.get_u64_le();
16007        __struct.flags = HilActuatorControlsFlags::from_bits(tmp).ok_or(
16008            ::mavlink_core::error::ParserError::InvalidFlag {
16009                flag_type: "HilActuatorControlsFlags",
16010                value: tmp as u64,
16011            },
16012        )?;
16013        for v in &mut __struct.controls {
16014            let val = buf.get_f32_le();
16015            *v = val;
16016        }
16017        let tmp = buf.get_u8();
16018        __struct.mode =
16019            MavModeFlag::from_bits(tmp).ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16020                flag_type: "MavModeFlag",
16021                value: tmp as u64,
16022            })?;
16023        Ok(__struct)
16024    }
16025    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16026        let mut __tmp = BytesMut::new(bytes);
16027        #[allow(clippy::absurd_extreme_comparisons)]
16028        #[allow(unused_comparisons)]
16029        if __tmp.remaining() < Self::ENCODED_LEN {
16030            panic!(
16031                "buffer is too small (need {} bytes, but got {})",
16032                Self::ENCODED_LEN,
16033                __tmp.remaining(),
16034            )
16035        }
16036        __tmp.put_u64_le(self.time_usec);
16037        __tmp.put_u64_le(self.flags.bits());
16038        for val in &self.controls {
16039            __tmp.put_f32_le(*val);
16040        }
16041        __tmp.put_u8(self.mode.bits());
16042        if matches!(version, MavlinkVersion::V2) {
16043            let len = __tmp.len();
16044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16045        } else {
16046            __tmp.len()
16047        }
16048    }
16049}
16050#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16051#[doc = ""]
16052#[doc = "ID: 91"]
16053#[derive(Debug, Clone, PartialEq)]
16054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16056#[cfg_attr(feature = "ts", derive(TS))]
16057#[cfg_attr(feature = "ts", ts(export))]
16058pub struct HIL_CONTROLS_DATA {
16059    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16060    pub time_usec: u64,
16061    #[doc = "Control output -1 .. 1"]
16062    pub roll_ailerons: f32,
16063    #[doc = "Control output -1 .. 1"]
16064    pub pitch_elevator: f32,
16065    #[doc = "Control output -1 .. 1"]
16066    pub yaw_rudder: f32,
16067    #[doc = "Throttle 0 .. 1"]
16068    pub throttle: f32,
16069    #[doc = "Aux 1, -1 .. 1"]
16070    pub aux1: f32,
16071    #[doc = "Aux 2, -1 .. 1"]
16072    pub aux2: f32,
16073    #[doc = "Aux 3, -1 .. 1"]
16074    pub aux3: f32,
16075    #[doc = "Aux 4, -1 .. 1"]
16076    pub aux4: f32,
16077    #[doc = "System mode."]
16078    pub mode: MavMode,
16079    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16080    pub nav_mode: u8,
16081}
16082impl HIL_CONTROLS_DATA {
16083    pub const ENCODED_LEN: usize = 42usize;
16084    pub const DEFAULT: Self = Self {
16085        time_usec: 0_u64,
16086        roll_ailerons: 0.0_f32,
16087        pitch_elevator: 0.0_f32,
16088        yaw_rudder: 0.0_f32,
16089        throttle: 0.0_f32,
16090        aux1: 0.0_f32,
16091        aux2: 0.0_f32,
16092        aux3: 0.0_f32,
16093        aux4: 0.0_f32,
16094        mode: MavMode::DEFAULT,
16095        nav_mode: 0_u8,
16096    };
16097    #[cfg(feature = "arbitrary")]
16098    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16099        use arbitrary::{Arbitrary, Unstructured};
16100        let mut buf = [0u8; 1024];
16101        rng.fill_bytes(&mut buf);
16102        let mut unstructured = Unstructured::new(&buf);
16103        Self::arbitrary(&mut unstructured).unwrap_or_default()
16104    }
16105}
16106impl Default for HIL_CONTROLS_DATA {
16107    fn default() -> Self {
16108        Self::DEFAULT.clone()
16109    }
16110}
16111impl MessageData for HIL_CONTROLS_DATA {
16112    type Message = MavMessage;
16113    const ID: u32 = 91u32;
16114    const NAME: &'static str = "HIL_CONTROLS";
16115    const EXTRA_CRC: u8 = 63u8;
16116    const ENCODED_LEN: usize = 42usize;
16117    fn deser(
16118        _version: MavlinkVersion,
16119        __input: &[u8],
16120    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16121        let avail_len = __input.len();
16122        let mut payload_buf = [0; Self::ENCODED_LEN];
16123        let mut buf = if avail_len < Self::ENCODED_LEN {
16124            payload_buf[0..avail_len].copy_from_slice(__input);
16125            Bytes::new(&payload_buf)
16126        } else {
16127            Bytes::new(__input)
16128        };
16129        let mut __struct = Self::default();
16130        __struct.time_usec = buf.get_u64_le();
16131        __struct.roll_ailerons = buf.get_f32_le();
16132        __struct.pitch_elevator = buf.get_f32_le();
16133        __struct.yaw_rudder = buf.get_f32_le();
16134        __struct.throttle = buf.get_f32_le();
16135        __struct.aux1 = buf.get_f32_le();
16136        __struct.aux2 = buf.get_f32_le();
16137        __struct.aux3 = buf.get_f32_le();
16138        __struct.aux4 = buf.get_f32_le();
16139        let tmp = buf.get_u8();
16140        __struct.mode =
16141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16142                enum_type: "MavMode",
16143                value: tmp as u64,
16144            })?;
16145        __struct.nav_mode = buf.get_u8();
16146        Ok(__struct)
16147    }
16148    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16149        let mut __tmp = BytesMut::new(bytes);
16150        #[allow(clippy::absurd_extreme_comparisons)]
16151        #[allow(unused_comparisons)]
16152        if __tmp.remaining() < Self::ENCODED_LEN {
16153            panic!(
16154                "buffer is too small (need {} bytes, but got {})",
16155                Self::ENCODED_LEN,
16156                __tmp.remaining(),
16157            )
16158        }
16159        __tmp.put_u64_le(self.time_usec);
16160        __tmp.put_f32_le(self.roll_ailerons);
16161        __tmp.put_f32_le(self.pitch_elevator);
16162        __tmp.put_f32_le(self.yaw_rudder);
16163        __tmp.put_f32_le(self.throttle);
16164        __tmp.put_f32_le(self.aux1);
16165        __tmp.put_f32_le(self.aux2);
16166        __tmp.put_f32_le(self.aux3);
16167        __tmp.put_f32_le(self.aux4);
16168        __tmp.put_u8(self.mode as u8);
16169        __tmp.put_u8(self.nav_mode);
16170        if matches!(version, MavlinkVersion::V2) {
16171            let len = __tmp.len();
16172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16173        } else {
16174            __tmp.len()
16175        }
16176    }
16177}
16178#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16179#[doc = ""]
16180#[doc = "ID: 113"]
16181#[derive(Debug, Clone, PartialEq)]
16182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16184#[cfg_attr(feature = "ts", derive(TS))]
16185#[cfg_attr(feature = "ts", ts(export))]
16186pub struct HIL_GPS_DATA {
16187    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16188    pub time_usec: u64,
16189    #[doc = "Latitude (WGS84)"]
16190    pub lat: i32,
16191    #[doc = "Longitude (WGS84)"]
16192    pub lon: i32,
16193    #[doc = "Altitude (MSL). Positive for up."]
16194    pub alt: i32,
16195    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16196    pub eph: u16,
16197    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16198    pub epv: u16,
16199    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16200    pub vel: u16,
16201    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16202    pub vn: i16,
16203    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16204    pub ve: i16,
16205    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16206    pub vd: i16,
16207    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16208    pub cog: u16,
16209    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16210    pub fix_type: u8,
16211    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16212    pub satellites_visible: u8,
16213    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16214    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16215    pub id: u8,
16216    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16217    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16218    pub yaw: u16,
16219}
16220impl HIL_GPS_DATA {
16221    pub const ENCODED_LEN: usize = 39usize;
16222    pub const DEFAULT: Self = Self {
16223        time_usec: 0_u64,
16224        lat: 0_i32,
16225        lon: 0_i32,
16226        alt: 0_i32,
16227        eph: 0_u16,
16228        epv: 0_u16,
16229        vel: 0_u16,
16230        vn: 0_i16,
16231        ve: 0_i16,
16232        vd: 0_i16,
16233        cog: 0_u16,
16234        fix_type: 0_u8,
16235        satellites_visible: 0_u8,
16236        id: 0_u8,
16237        yaw: 0_u16,
16238    };
16239    #[cfg(feature = "arbitrary")]
16240    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16241        use arbitrary::{Arbitrary, Unstructured};
16242        let mut buf = [0u8; 1024];
16243        rng.fill_bytes(&mut buf);
16244        let mut unstructured = Unstructured::new(&buf);
16245        Self::arbitrary(&mut unstructured).unwrap_or_default()
16246    }
16247}
16248impl Default for HIL_GPS_DATA {
16249    fn default() -> Self {
16250        Self::DEFAULT.clone()
16251    }
16252}
16253impl MessageData for HIL_GPS_DATA {
16254    type Message = MavMessage;
16255    const ID: u32 = 113u32;
16256    const NAME: &'static str = "HIL_GPS";
16257    const EXTRA_CRC: u8 = 124u8;
16258    const ENCODED_LEN: usize = 39usize;
16259    fn deser(
16260        _version: MavlinkVersion,
16261        __input: &[u8],
16262    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16263        let avail_len = __input.len();
16264        let mut payload_buf = [0; Self::ENCODED_LEN];
16265        let mut buf = if avail_len < Self::ENCODED_LEN {
16266            payload_buf[0..avail_len].copy_from_slice(__input);
16267            Bytes::new(&payload_buf)
16268        } else {
16269            Bytes::new(__input)
16270        };
16271        let mut __struct = Self::default();
16272        __struct.time_usec = buf.get_u64_le();
16273        __struct.lat = buf.get_i32_le();
16274        __struct.lon = buf.get_i32_le();
16275        __struct.alt = buf.get_i32_le();
16276        __struct.eph = buf.get_u16_le();
16277        __struct.epv = buf.get_u16_le();
16278        __struct.vel = buf.get_u16_le();
16279        __struct.vn = buf.get_i16_le();
16280        __struct.ve = buf.get_i16_le();
16281        __struct.vd = buf.get_i16_le();
16282        __struct.cog = buf.get_u16_le();
16283        __struct.fix_type = buf.get_u8();
16284        __struct.satellites_visible = buf.get_u8();
16285        __struct.id = buf.get_u8();
16286        __struct.yaw = buf.get_u16_le();
16287        Ok(__struct)
16288    }
16289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16290        let mut __tmp = BytesMut::new(bytes);
16291        #[allow(clippy::absurd_extreme_comparisons)]
16292        #[allow(unused_comparisons)]
16293        if __tmp.remaining() < Self::ENCODED_LEN {
16294            panic!(
16295                "buffer is too small (need {} bytes, but got {})",
16296                Self::ENCODED_LEN,
16297                __tmp.remaining(),
16298            )
16299        }
16300        __tmp.put_u64_le(self.time_usec);
16301        __tmp.put_i32_le(self.lat);
16302        __tmp.put_i32_le(self.lon);
16303        __tmp.put_i32_le(self.alt);
16304        __tmp.put_u16_le(self.eph);
16305        __tmp.put_u16_le(self.epv);
16306        __tmp.put_u16_le(self.vel);
16307        __tmp.put_i16_le(self.vn);
16308        __tmp.put_i16_le(self.ve);
16309        __tmp.put_i16_le(self.vd);
16310        __tmp.put_u16_le(self.cog);
16311        __tmp.put_u8(self.fix_type);
16312        __tmp.put_u8(self.satellites_visible);
16313        if matches!(version, MavlinkVersion::V2) {
16314            __tmp.put_u8(self.id);
16315            __tmp.put_u16_le(self.yaw);
16316            let len = __tmp.len();
16317            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16318        } else {
16319            __tmp.len()
16320        }
16321    }
16322}
16323#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16324#[doc = ""]
16325#[doc = "ID: 114"]
16326#[derive(Debug, Clone, PartialEq)]
16327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16329#[cfg_attr(feature = "ts", derive(TS))]
16330#[cfg_attr(feature = "ts", ts(export))]
16331pub struct HIL_OPTICAL_FLOW_DATA {
16332    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16333    pub time_usec: u64,
16334    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16335    pub integration_time_us: u32,
16336    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16337    pub integrated_x: f32,
16338    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16339    pub integrated_y: f32,
16340    #[doc = "RH rotation around X axis"]
16341    pub integrated_xgyro: f32,
16342    #[doc = "RH rotation around Y axis"]
16343    pub integrated_ygyro: f32,
16344    #[doc = "RH rotation around Z axis"]
16345    pub integrated_zgyro: f32,
16346    #[doc = "Time since the distance was sampled."]
16347    pub time_delta_distance_us: u32,
16348    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16349    pub distance: f32,
16350    #[doc = "Temperature"]
16351    pub temperature: i16,
16352    #[doc = "Sensor ID"]
16353    pub sensor_id: u8,
16354    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16355    pub quality: u8,
16356}
16357impl HIL_OPTICAL_FLOW_DATA {
16358    pub const ENCODED_LEN: usize = 44usize;
16359    pub const DEFAULT: Self = Self {
16360        time_usec: 0_u64,
16361        integration_time_us: 0_u32,
16362        integrated_x: 0.0_f32,
16363        integrated_y: 0.0_f32,
16364        integrated_xgyro: 0.0_f32,
16365        integrated_ygyro: 0.0_f32,
16366        integrated_zgyro: 0.0_f32,
16367        time_delta_distance_us: 0_u32,
16368        distance: 0.0_f32,
16369        temperature: 0_i16,
16370        sensor_id: 0_u8,
16371        quality: 0_u8,
16372    };
16373    #[cfg(feature = "arbitrary")]
16374    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16375        use arbitrary::{Arbitrary, Unstructured};
16376        let mut buf = [0u8; 1024];
16377        rng.fill_bytes(&mut buf);
16378        let mut unstructured = Unstructured::new(&buf);
16379        Self::arbitrary(&mut unstructured).unwrap_or_default()
16380    }
16381}
16382impl Default for HIL_OPTICAL_FLOW_DATA {
16383    fn default() -> Self {
16384        Self::DEFAULT.clone()
16385    }
16386}
16387impl MessageData for HIL_OPTICAL_FLOW_DATA {
16388    type Message = MavMessage;
16389    const ID: u32 = 114u32;
16390    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16391    const EXTRA_CRC: u8 = 237u8;
16392    const ENCODED_LEN: usize = 44usize;
16393    fn deser(
16394        _version: MavlinkVersion,
16395        __input: &[u8],
16396    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16397        let avail_len = __input.len();
16398        let mut payload_buf = [0; Self::ENCODED_LEN];
16399        let mut buf = if avail_len < Self::ENCODED_LEN {
16400            payload_buf[0..avail_len].copy_from_slice(__input);
16401            Bytes::new(&payload_buf)
16402        } else {
16403            Bytes::new(__input)
16404        };
16405        let mut __struct = Self::default();
16406        __struct.time_usec = buf.get_u64_le();
16407        __struct.integration_time_us = buf.get_u32_le();
16408        __struct.integrated_x = buf.get_f32_le();
16409        __struct.integrated_y = buf.get_f32_le();
16410        __struct.integrated_xgyro = buf.get_f32_le();
16411        __struct.integrated_ygyro = buf.get_f32_le();
16412        __struct.integrated_zgyro = buf.get_f32_le();
16413        __struct.time_delta_distance_us = buf.get_u32_le();
16414        __struct.distance = buf.get_f32_le();
16415        __struct.temperature = buf.get_i16_le();
16416        __struct.sensor_id = buf.get_u8();
16417        __struct.quality = buf.get_u8();
16418        Ok(__struct)
16419    }
16420    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16421        let mut __tmp = BytesMut::new(bytes);
16422        #[allow(clippy::absurd_extreme_comparisons)]
16423        #[allow(unused_comparisons)]
16424        if __tmp.remaining() < Self::ENCODED_LEN {
16425            panic!(
16426                "buffer is too small (need {} bytes, but got {})",
16427                Self::ENCODED_LEN,
16428                __tmp.remaining(),
16429            )
16430        }
16431        __tmp.put_u64_le(self.time_usec);
16432        __tmp.put_u32_le(self.integration_time_us);
16433        __tmp.put_f32_le(self.integrated_x);
16434        __tmp.put_f32_le(self.integrated_y);
16435        __tmp.put_f32_le(self.integrated_xgyro);
16436        __tmp.put_f32_le(self.integrated_ygyro);
16437        __tmp.put_f32_le(self.integrated_zgyro);
16438        __tmp.put_u32_le(self.time_delta_distance_us);
16439        __tmp.put_f32_le(self.distance);
16440        __tmp.put_i16_le(self.temperature);
16441        __tmp.put_u8(self.sensor_id);
16442        __tmp.put_u8(self.quality);
16443        if matches!(version, MavlinkVersion::V2) {
16444            let len = __tmp.len();
16445            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16446        } else {
16447            __tmp.len()
16448        }
16449    }
16450}
16451#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16452#[doc = ""]
16453#[doc = "ID: 92"]
16454#[derive(Debug, Clone, PartialEq)]
16455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16456#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16457#[cfg_attr(feature = "ts", derive(TS))]
16458#[cfg_attr(feature = "ts", ts(export))]
16459pub struct HIL_RC_INPUTS_RAW_DATA {
16460    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16461    pub time_usec: u64,
16462    #[doc = "RC channel 1 value"]
16463    pub chan1_raw: u16,
16464    #[doc = "RC channel 2 value"]
16465    pub chan2_raw: u16,
16466    #[doc = "RC channel 3 value"]
16467    pub chan3_raw: u16,
16468    #[doc = "RC channel 4 value"]
16469    pub chan4_raw: u16,
16470    #[doc = "RC channel 5 value"]
16471    pub chan5_raw: u16,
16472    #[doc = "RC channel 6 value"]
16473    pub chan6_raw: u16,
16474    #[doc = "RC channel 7 value"]
16475    pub chan7_raw: u16,
16476    #[doc = "RC channel 8 value"]
16477    pub chan8_raw: u16,
16478    #[doc = "RC channel 9 value"]
16479    pub chan9_raw: u16,
16480    #[doc = "RC channel 10 value"]
16481    pub chan10_raw: u16,
16482    #[doc = "RC channel 11 value"]
16483    pub chan11_raw: u16,
16484    #[doc = "RC channel 12 value"]
16485    pub chan12_raw: u16,
16486    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16487    pub rssi: u8,
16488}
16489impl HIL_RC_INPUTS_RAW_DATA {
16490    pub const ENCODED_LEN: usize = 33usize;
16491    pub const DEFAULT: Self = Self {
16492        time_usec: 0_u64,
16493        chan1_raw: 0_u16,
16494        chan2_raw: 0_u16,
16495        chan3_raw: 0_u16,
16496        chan4_raw: 0_u16,
16497        chan5_raw: 0_u16,
16498        chan6_raw: 0_u16,
16499        chan7_raw: 0_u16,
16500        chan8_raw: 0_u16,
16501        chan9_raw: 0_u16,
16502        chan10_raw: 0_u16,
16503        chan11_raw: 0_u16,
16504        chan12_raw: 0_u16,
16505        rssi: 0_u8,
16506    };
16507    #[cfg(feature = "arbitrary")]
16508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16509        use arbitrary::{Arbitrary, Unstructured};
16510        let mut buf = [0u8; 1024];
16511        rng.fill_bytes(&mut buf);
16512        let mut unstructured = Unstructured::new(&buf);
16513        Self::arbitrary(&mut unstructured).unwrap_or_default()
16514    }
16515}
16516impl Default for HIL_RC_INPUTS_RAW_DATA {
16517    fn default() -> Self {
16518        Self::DEFAULT.clone()
16519    }
16520}
16521impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16522    type Message = MavMessage;
16523    const ID: u32 = 92u32;
16524    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16525    const EXTRA_CRC: u8 = 54u8;
16526    const ENCODED_LEN: usize = 33usize;
16527    fn deser(
16528        _version: MavlinkVersion,
16529        __input: &[u8],
16530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16531        let avail_len = __input.len();
16532        let mut payload_buf = [0; Self::ENCODED_LEN];
16533        let mut buf = if avail_len < Self::ENCODED_LEN {
16534            payload_buf[0..avail_len].copy_from_slice(__input);
16535            Bytes::new(&payload_buf)
16536        } else {
16537            Bytes::new(__input)
16538        };
16539        let mut __struct = Self::default();
16540        __struct.time_usec = buf.get_u64_le();
16541        __struct.chan1_raw = buf.get_u16_le();
16542        __struct.chan2_raw = buf.get_u16_le();
16543        __struct.chan3_raw = buf.get_u16_le();
16544        __struct.chan4_raw = buf.get_u16_le();
16545        __struct.chan5_raw = buf.get_u16_le();
16546        __struct.chan6_raw = buf.get_u16_le();
16547        __struct.chan7_raw = buf.get_u16_le();
16548        __struct.chan8_raw = buf.get_u16_le();
16549        __struct.chan9_raw = buf.get_u16_le();
16550        __struct.chan10_raw = buf.get_u16_le();
16551        __struct.chan11_raw = buf.get_u16_le();
16552        __struct.chan12_raw = buf.get_u16_le();
16553        __struct.rssi = buf.get_u8();
16554        Ok(__struct)
16555    }
16556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16557        let mut __tmp = BytesMut::new(bytes);
16558        #[allow(clippy::absurd_extreme_comparisons)]
16559        #[allow(unused_comparisons)]
16560        if __tmp.remaining() < Self::ENCODED_LEN {
16561            panic!(
16562                "buffer is too small (need {} bytes, but got {})",
16563                Self::ENCODED_LEN,
16564                __tmp.remaining(),
16565            )
16566        }
16567        __tmp.put_u64_le(self.time_usec);
16568        __tmp.put_u16_le(self.chan1_raw);
16569        __tmp.put_u16_le(self.chan2_raw);
16570        __tmp.put_u16_le(self.chan3_raw);
16571        __tmp.put_u16_le(self.chan4_raw);
16572        __tmp.put_u16_le(self.chan5_raw);
16573        __tmp.put_u16_le(self.chan6_raw);
16574        __tmp.put_u16_le(self.chan7_raw);
16575        __tmp.put_u16_le(self.chan8_raw);
16576        __tmp.put_u16_le(self.chan9_raw);
16577        __tmp.put_u16_le(self.chan10_raw);
16578        __tmp.put_u16_le(self.chan11_raw);
16579        __tmp.put_u16_le(self.chan12_raw);
16580        __tmp.put_u8(self.rssi);
16581        if matches!(version, MavlinkVersion::V2) {
16582            let len = __tmp.len();
16583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16584        } else {
16585            __tmp.len()
16586        }
16587    }
16588}
16589#[doc = "The IMU readings in SI units in NED body frame."]
16590#[doc = ""]
16591#[doc = "ID: 107"]
16592#[derive(Debug, Clone, PartialEq)]
16593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16595#[cfg_attr(feature = "ts", derive(TS))]
16596#[cfg_attr(feature = "ts", ts(export))]
16597pub struct HIL_SENSOR_DATA {
16598    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16599    pub time_usec: u64,
16600    #[doc = "X acceleration"]
16601    pub xacc: f32,
16602    #[doc = "Y acceleration"]
16603    pub yacc: f32,
16604    #[doc = "Z acceleration"]
16605    pub zacc: f32,
16606    #[doc = "Angular speed around X axis in body frame"]
16607    pub xgyro: f32,
16608    #[doc = "Angular speed around Y axis in body frame"]
16609    pub ygyro: f32,
16610    #[doc = "Angular speed around Z axis in body frame"]
16611    pub zgyro: f32,
16612    #[doc = "X Magnetic field"]
16613    pub xmag: f32,
16614    #[doc = "Y Magnetic field"]
16615    pub ymag: f32,
16616    #[doc = "Z Magnetic field"]
16617    pub zmag: f32,
16618    #[doc = "Absolute pressure"]
16619    pub abs_pressure: f32,
16620    #[doc = "Differential pressure (airspeed)"]
16621    pub diff_pressure: f32,
16622    #[doc = "Altitude calculated from pressure"]
16623    pub pressure_alt: f32,
16624    #[doc = "Temperature"]
16625    pub temperature: f32,
16626    #[doc = "Bitmap for fields that have updated since last message"]
16627    pub fields_updated: HilSensorUpdatedFlags,
16628    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16629    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16630    pub id: u8,
16631}
16632impl HIL_SENSOR_DATA {
16633    pub const ENCODED_LEN: usize = 65usize;
16634    pub const DEFAULT: Self = Self {
16635        time_usec: 0_u64,
16636        xacc: 0.0_f32,
16637        yacc: 0.0_f32,
16638        zacc: 0.0_f32,
16639        xgyro: 0.0_f32,
16640        ygyro: 0.0_f32,
16641        zgyro: 0.0_f32,
16642        xmag: 0.0_f32,
16643        ymag: 0.0_f32,
16644        zmag: 0.0_f32,
16645        abs_pressure: 0.0_f32,
16646        diff_pressure: 0.0_f32,
16647        pressure_alt: 0.0_f32,
16648        temperature: 0.0_f32,
16649        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16650        id: 0_u8,
16651    };
16652    #[cfg(feature = "arbitrary")]
16653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16654        use arbitrary::{Arbitrary, Unstructured};
16655        let mut buf = [0u8; 1024];
16656        rng.fill_bytes(&mut buf);
16657        let mut unstructured = Unstructured::new(&buf);
16658        Self::arbitrary(&mut unstructured).unwrap_or_default()
16659    }
16660}
16661impl Default for HIL_SENSOR_DATA {
16662    fn default() -> Self {
16663        Self::DEFAULT.clone()
16664    }
16665}
16666impl MessageData for HIL_SENSOR_DATA {
16667    type Message = MavMessage;
16668    const ID: u32 = 107u32;
16669    const NAME: &'static str = "HIL_SENSOR";
16670    const EXTRA_CRC: u8 = 108u8;
16671    const ENCODED_LEN: usize = 65usize;
16672    fn deser(
16673        _version: MavlinkVersion,
16674        __input: &[u8],
16675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16676        let avail_len = __input.len();
16677        let mut payload_buf = [0; Self::ENCODED_LEN];
16678        let mut buf = if avail_len < Self::ENCODED_LEN {
16679            payload_buf[0..avail_len].copy_from_slice(__input);
16680            Bytes::new(&payload_buf)
16681        } else {
16682            Bytes::new(__input)
16683        };
16684        let mut __struct = Self::default();
16685        __struct.time_usec = buf.get_u64_le();
16686        __struct.xacc = buf.get_f32_le();
16687        __struct.yacc = buf.get_f32_le();
16688        __struct.zacc = buf.get_f32_le();
16689        __struct.xgyro = buf.get_f32_le();
16690        __struct.ygyro = buf.get_f32_le();
16691        __struct.zgyro = buf.get_f32_le();
16692        __struct.xmag = buf.get_f32_le();
16693        __struct.ymag = buf.get_f32_le();
16694        __struct.zmag = buf.get_f32_le();
16695        __struct.abs_pressure = buf.get_f32_le();
16696        __struct.diff_pressure = buf.get_f32_le();
16697        __struct.pressure_alt = buf.get_f32_le();
16698        __struct.temperature = buf.get_f32_le();
16699        let tmp = buf.get_u32_le();
16700        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(tmp).ok_or(
16701            ::mavlink_core::error::ParserError::InvalidFlag {
16702                flag_type: "HilSensorUpdatedFlags",
16703                value: tmp as u64,
16704            },
16705        )?;
16706        __struct.id = buf.get_u8();
16707        Ok(__struct)
16708    }
16709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16710        let mut __tmp = BytesMut::new(bytes);
16711        #[allow(clippy::absurd_extreme_comparisons)]
16712        #[allow(unused_comparisons)]
16713        if __tmp.remaining() < Self::ENCODED_LEN {
16714            panic!(
16715                "buffer is too small (need {} bytes, but got {})",
16716                Self::ENCODED_LEN,
16717                __tmp.remaining(),
16718            )
16719        }
16720        __tmp.put_u64_le(self.time_usec);
16721        __tmp.put_f32_le(self.xacc);
16722        __tmp.put_f32_le(self.yacc);
16723        __tmp.put_f32_le(self.zacc);
16724        __tmp.put_f32_le(self.xgyro);
16725        __tmp.put_f32_le(self.ygyro);
16726        __tmp.put_f32_le(self.zgyro);
16727        __tmp.put_f32_le(self.xmag);
16728        __tmp.put_f32_le(self.ymag);
16729        __tmp.put_f32_le(self.zmag);
16730        __tmp.put_f32_le(self.abs_pressure);
16731        __tmp.put_f32_le(self.diff_pressure);
16732        __tmp.put_f32_le(self.pressure_alt);
16733        __tmp.put_f32_le(self.temperature);
16734        __tmp.put_u32_le(self.fields_updated.bits());
16735        if matches!(version, MavlinkVersion::V2) {
16736            __tmp.put_u8(self.id);
16737            let len = __tmp.len();
16738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16739        } else {
16740            __tmp.len()
16741        }
16742    }
16743}
16744#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16745#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16746#[doc = ""]
16747#[doc = "ID: 90"]
16748#[derive(Debug, Clone, PartialEq)]
16749#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16750#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16751#[cfg_attr(feature = "ts", derive(TS))]
16752#[cfg_attr(feature = "ts", ts(export))]
16753pub struct HIL_STATE_DATA {
16754    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16755    pub time_usec: u64,
16756    #[doc = "Roll angle"]
16757    pub roll: f32,
16758    #[doc = "Pitch angle"]
16759    pub pitch: f32,
16760    #[doc = "Yaw angle"]
16761    pub yaw: f32,
16762    #[doc = "Body frame roll / phi angular speed"]
16763    pub rollspeed: f32,
16764    #[doc = "Body frame pitch / theta angular speed"]
16765    pub pitchspeed: f32,
16766    #[doc = "Body frame yaw / psi angular speed"]
16767    pub yawspeed: f32,
16768    #[doc = "Latitude"]
16769    pub lat: i32,
16770    #[doc = "Longitude"]
16771    pub lon: i32,
16772    #[doc = "Altitude"]
16773    pub alt: i32,
16774    #[doc = "Ground X Speed (Latitude)"]
16775    pub vx: i16,
16776    #[doc = "Ground Y Speed (Longitude)"]
16777    pub vy: i16,
16778    #[doc = "Ground Z Speed (Altitude)"]
16779    pub vz: i16,
16780    #[doc = "X acceleration"]
16781    pub xacc: i16,
16782    #[doc = "Y acceleration"]
16783    pub yacc: i16,
16784    #[doc = "Z acceleration"]
16785    pub zacc: i16,
16786}
16787impl HIL_STATE_DATA {
16788    pub const ENCODED_LEN: usize = 56usize;
16789    pub const DEFAULT: Self = Self {
16790        time_usec: 0_u64,
16791        roll: 0.0_f32,
16792        pitch: 0.0_f32,
16793        yaw: 0.0_f32,
16794        rollspeed: 0.0_f32,
16795        pitchspeed: 0.0_f32,
16796        yawspeed: 0.0_f32,
16797        lat: 0_i32,
16798        lon: 0_i32,
16799        alt: 0_i32,
16800        vx: 0_i16,
16801        vy: 0_i16,
16802        vz: 0_i16,
16803        xacc: 0_i16,
16804        yacc: 0_i16,
16805        zacc: 0_i16,
16806    };
16807    #[cfg(feature = "arbitrary")]
16808    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16809        use arbitrary::{Arbitrary, Unstructured};
16810        let mut buf = [0u8; 1024];
16811        rng.fill_bytes(&mut buf);
16812        let mut unstructured = Unstructured::new(&buf);
16813        Self::arbitrary(&mut unstructured).unwrap_or_default()
16814    }
16815}
16816impl Default for HIL_STATE_DATA {
16817    fn default() -> Self {
16818        Self::DEFAULT.clone()
16819    }
16820}
16821impl MessageData for HIL_STATE_DATA {
16822    type Message = MavMessage;
16823    const ID: u32 = 90u32;
16824    const NAME: &'static str = "HIL_STATE";
16825    const EXTRA_CRC: u8 = 183u8;
16826    const ENCODED_LEN: usize = 56usize;
16827    fn deser(
16828        _version: MavlinkVersion,
16829        __input: &[u8],
16830    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16831        let avail_len = __input.len();
16832        let mut payload_buf = [0; Self::ENCODED_LEN];
16833        let mut buf = if avail_len < Self::ENCODED_LEN {
16834            payload_buf[0..avail_len].copy_from_slice(__input);
16835            Bytes::new(&payload_buf)
16836        } else {
16837            Bytes::new(__input)
16838        };
16839        let mut __struct = Self::default();
16840        __struct.time_usec = buf.get_u64_le();
16841        __struct.roll = buf.get_f32_le();
16842        __struct.pitch = buf.get_f32_le();
16843        __struct.yaw = buf.get_f32_le();
16844        __struct.rollspeed = buf.get_f32_le();
16845        __struct.pitchspeed = buf.get_f32_le();
16846        __struct.yawspeed = buf.get_f32_le();
16847        __struct.lat = buf.get_i32_le();
16848        __struct.lon = buf.get_i32_le();
16849        __struct.alt = buf.get_i32_le();
16850        __struct.vx = buf.get_i16_le();
16851        __struct.vy = buf.get_i16_le();
16852        __struct.vz = buf.get_i16_le();
16853        __struct.xacc = buf.get_i16_le();
16854        __struct.yacc = buf.get_i16_le();
16855        __struct.zacc = buf.get_i16_le();
16856        Ok(__struct)
16857    }
16858    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16859        let mut __tmp = BytesMut::new(bytes);
16860        #[allow(clippy::absurd_extreme_comparisons)]
16861        #[allow(unused_comparisons)]
16862        if __tmp.remaining() < Self::ENCODED_LEN {
16863            panic!(
16864                "buffer is too small (need {} bytes, but got {})",
16865                Self::ENCODED_LEN,
16866                __tmp.remaining(),
16867            )
16868        }
16869        __tmp.put_u64_le(self.time_usec);
16870        __tmp.put_f32_le(self.roll);
16871        __tmp.put_f32_le(self.pitch);
16872        __tmp.put_f32_le(self.yaw);
16873        __tmp.put_f32_le(self.rollspeed);
16874        __tmp.put_f32_le(self.pitchspeed);
16875        __tmp.put_f32_le(self.yawspeed);
16876        __tmp.put_i32_le(self.lat);
16877        __tmp.put_i32_le(self.lon);
16878        __tmp.put_i32_le(self.alt);
16879        __tmp.put_i16_le(self.vx);
16880        __tmp.put_i16_le(self.vy);
16881        __tmp.put_i16_le(self.vz);
16882        __tmp.put_i16_le(self.xacc);
16883        __tmp.put_i16_le(self.yacc);
16884        __tmp.put_i16_le(self.zacc);
16885        if matches!(version, MavlinkVersion::V2) {
16886            let len = __tmp.len();
16887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16888        } else {
16889            __tmp.len()
16890        }
16891    }
16892}
16893#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16894#[doc = ""]
16895#[doc = "ID: 115"]
16896#[derive(Debug, Clone, PartialEq)]
16897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16899#[cfg_attr(feature = "ts", derive(TS))]
16900#[cfg_attr(feature = "ts", ts(export))]
16901pub struct HIL_STATE_QUATERNION_DATA {
16902    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16903    pub time_usec: u64,
16904    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16905    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16906    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16907    pub attitude_quaternion: [f32; 4],
16908    #[doc = "Body frame roll / phi angular speed"]
16909    pub rollspeed: f32,
16910    #[doc = "Body frame pitch / theta angular speed"]
16911    pub pitchspeed: f32,
16912    #[doc = "Body frame yaw / psi angular speed"]
16913    pub yawspeed: f32,
16914    #[doc = "Latitude"]
16915    pub lat: i32,
16916    #[doc = "Longitude"]
16917    pub lon: i32,
16918    #[doc = "Altitude"]
16919    pub alt: i32,
16920    #[doc = "Ground X Speed (Latitude)"]
16921    pub vx: i16,
16922    #[doc = "Ground Y Speed (Longitude)"]
16923    pub vy: i16,
16924    #[doc = "Ground Z Speed (Altitude)"]
16925    pub vz: i16,
16926    #[doc = "Indicated airspeed"]
16927    pub ind_airspeed: u16,
16928    #[doc = "True airspeed"]
16929    pub true_airspeed: u16,
16930    #[doc = "X acceleration"]
16931    pub xacc: i16,
16932    #[doc = "Y acceleration"]
16933    pub yacc: i16,
16934    #[doc = "Z acceleration"]
16935    pub zacc: i16,
16936}
16937impl HIL_STATE_QUATERNION_DATA {
16938    pub const ENCODED_LEN: usize = 64usize;
16939    pub const DEFAULT: Self = Self {
16940        time_usec: 0_u64,
16941        attitude_quaternion: [0.0_f32; 4usize],
16942        rollspeed: 0.0_f32,
16943        pitchspeed: 0.0_f32,
16944        yawspeed: 0.0_f32,
16945        lat: 0_i32,
16946        lon: 0_i32,
16947        alt: 0_i32,
16948        vx: 0_i16,
16949        vy: 0_i16,
16950        vz: 0_i16,
16951        ind_airspeed: 0_u16,
16952        true_airspeed: 0_u16,
16953        xacc: 0_i16,
16954        yacc: 0_i16,
16955        zacc: 0_i16,
16956    };
16957    #[cfg(feature = "arbitrary")]
16958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16959        use arbitrary::{Arbitrary, Unstructured};
16960        let mut buf = [0u8; 1024];
16961        rng.fill_bytes(&mut buf);
16962        let mut unstructured = Unstructured::new(&buf);
16963        Self::arbitrary(&mut unstructured).unwrap_or_default()
16964    }
16965}
16966impl Default for HIL_STATE_QUATERNION_DATA {
16967    fn default() -> Self {
16968        Self::DEFAULT.clone()
16969    }
16970}
16971impl MessageData for HIL_STATE_QUATERNION_DATA {
16972    type Message = MavMessage;
16973    const ID: u32 = 115u32;
16974    const NAME: &'static str = "HIL_STATE_QUATERNION";
16975    const EXTRA_CRC: u8 = 4u8;
16976    const ENCODED_LEN: usize = 64usize;
16977    fn deser(
16978        _version: MavlinkVersion,
16979        __input: &[u8],
16980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16981        let avail_len = __input.len();
16982        let mut payload_buf = [0; Self::ENCODED_LEN];
16983        let mut buf = if avail_len < Self::ENCODED_LEN {
16984            payload_buf[0..avail_len].copy_from_slice(__input);
16985            Bytes::new(&payload_buf)
16986        } else {
16987            Bytes::new(__input)
16988        };
16989        let mut __struct = Self::default();
16990        __struct.time_usec = buf.get_u64_le();
16991        for v in &mut __struct.attitude_quaternion {
16992            let val = buf.get_f32_le();
16993            *v = val;
16994        }
16995        __struct.rollspeed = buf.get_f32_le();
16996        __struct.pitchspeed = buf.get_f32_le();
16997        __struct.yawspeed = buf.get_f32_le();
16998        __struct.lat = buf.get_i32_le();
16999        __struct.lon = buf.get_i32_le();
17000        __struct.alt = buf.get_i32_le();
17001        __struct.vx = buf.get_i16_le();
17002        __struct.vy = buf.get_i16_le();
17003        __struct.vz = buf.get_i16_le();
17004        __struct.ind_airspeed = buf.get_u16_le();
17005        __struct.true_airspeed = buf.get_u16_le();
17006        __struct.xacc = buf.get_i16_le();
17007        __struct.yacc = buf.get_i16_le();
17008        __struct.zacc = buf.get_i16_le();
17009        Ok(__struct)
17010    }
17011    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17012        let mut __tmp = BytesMut::new(bytes);
17013        #[allow(clippy::absurd_extreme_comparisons)]
17014        #[allow(unused_comparisons)]
17015        if __tmp.remaining() < Self::ENCODED_LEN {
17016            panic!(
17017                "buffer is too small (need {} bytes, but got {})",
17018                Self::ENCODED_LEN,
17019                __tmp.remaining(),
17020            )
17021        }
17022        __tmp.put_u64_le(self.time_usec);
17023        for val in &self.attitude_quaternion {
17024            __tmp.put_f32_le(*val);
17025        }
17026        __tmp.put_f32_le(self.rollspeed);
17027        __tmp.put_f32_le(self.pitchspeed);
17028        __tmp.put_f32_le(self.yawspeed);
17029        __tmp.put_i32_le(self.lat);
17030        __tmp.put_i32_le(self.lon);
17031        __tmp.put_i32_le(self.alt);
17032        __tmp.put_i16_le(self.vx);
17033        __tmp.put_i16_le(self.vy);
17034        __tmp.put_i16_le(self.vz);
17035        __tmp.put_u16_le(self.ind_airspeed);
17036        __tmp.put_u16_le(self.true_airspeed);
17037        __tmp.put_i16_le(self.xacc);
17038        __tmp.put_i16_le(self.yacc);
17039        __tmp.put_i16_le(self.zacc);
17040        if matches!(version, MavlinkVersion::V2) {
17041            let len = __tmp.len();
17042            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17043        } else {
17044            __tmp.len()
17045        }
17046    }
17047}
17048#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17049#[doc = ""]
17050#[doc = "ID: 242"]
17051#[derive(Debug, Clone, PartialEq)]
17052#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17053#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17054#[cfg_attr(feature = "ts", derive(TS))]
17055#[cfg_attr(feature = "ts", ts(export))]
17056pub struct HOME_POSITION_DATA {
17057    #[doc = "Latitude (WGS84)"]
17058    pub latitude: i32,
17059    #[doc = "Longitude (WGS84)"]
17060    pub longitude: i32,
17061    #[doc = "Altitude (MSL). Positive for up."]
17062    pub altitude: i32,
17063    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17064    pub x: f32,
17065    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17066    pub y: f32,
17067    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17068    pub z: f32,
17069    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17070    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17071    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17072    pub q: [f32; 4],
17073    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17074    pub approach_x: f32,
17075    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17076    pub approach_y: f32,
17077    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17078    pub approach_z: f32,
17079    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17081    pub time_usec: u64,
17082}
17083impl HOME_POSITION_DATA {
17084    pub const ENCODED_LEN: usize = 60usize;
17085    pub const DEFAULT: Self = Self {
17086        latitude: 0_i32,
17087        longitude: 0_i32,
17088        altitude: 0_i32,
17089        x: 0.0_f32,
17090        y: 0.0_f32,
17091        z: 0.0_f32,
17092        q: [0.0_f32; 4usize],
17093        approach_x: 0.0_f32,
17094        approach_y: 0.0_f32,
17095        approach_z: 0.0_f32,
17096        time_usec: 0_u64,
17097    };
17098    #[cfg(feature = "arbitrary")]
17099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17100        use arbitrary::{Arbitrary, Unstructured};
17101        let mut buf = [0u8; 1024];
17102        rng.fill_bytes(&mut buf);
17103        let mut unstructured = Unstructured::new(&buf);
17104        Self::arbitrary(&mut unstructured).unwrap_or_default()
17105    }
17106}
17107impl Default for HOME_POSITION_DATA {
17108    fn default() -> Self {
17109        Self::DEFAULT.clone()
17110    }
17111}
17112impl MessageData for HOME_POSITION_DATA {
17113    type Message = MavMessage;
17114    const ID: u32 = 242u32;
17115    const NAME: &'static str = "HOME_POSITION";
17116    const EXTRA_CRC: u8 = 104u8;
17117    const ENCODED_LEN: usize = 60usize;
17118    fn deser(
17119        _version: MavlinkVersion,
17120        __input: &[u8],
17121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17122        let avail_len = __input.len();
17123        let mut payload_buf = [0; Self::ENCODED_LEN];
17124        let mut buf = if avail_len < Self::ENCODED_LEN {
17125            payload_buf[0..avail_len].copy_from_slice(__input);
17126            Bytes::new(&payload_buf)
17127        } else {
17128            Bytes::new(__input)
17129        };
17130        let mut __struct = Self::default();
17131        __struct.latitude = buf.get_i32_le();
17132        __struct.longitude = buf.get_i32_le();
17133        __struct.altitude = buf.get_i32_le();
17134        __struct.x = buf.get_f32_le();
17135        __struct.y = buf.get_f32_le();
17136        __struct.z = buf.get_f32_le();
17137        for v in &mut __struct.q {
17138            let val = buf.get_f32_le();
17139            *v = val;
17140        }
17141        __struct.approach_x = buf.get_f32_le();
17142        __struct.approach_y = buf.get_f32_le();
17143        __struct.approach_z = buf.get_f32_le();
17144        __struct.time_usec = buf.get_u64_le();
17145        Ok(__struct)
17146    }
17147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17148        let mut __tmp = BytesMut::new(bytes);
17149        #[allow(clippy::absurd_extreme_comparisons)]
17150        #[allow(unused_comparisons)]
17151        if __tmp.remaining() < Self::ENCODED_LEN {
17152            panic!(
17153                "buffer is too small (need {} bytes, but got {})",
17154                Self::ENCODED_LEN,
17155                __tmp.remaining(),
17156            )
17157        }
17158        __tmp.put_i32_le(self.latitude);
17159        __tmp.put_i32_le(self.longitude);
17160        __tmp.put_i32_le(self.altitude);
17161        __tmp.put_f32_le(self.x);
17162        __tmp.put_f32_le(self.y);
17163        __tmp.put_f32_le(self.z);
17164        for val in &self.q {
17165            __tmp.put_f32_le(*val);
17166        }
17167        __tmp.put_f32_le(self.approach_x);
17168        __tmp.put_f32_le(self.approach_y);
17169        __tmp.put_f32_le(self.approach_z);
17170        if matches!(version, MavlinkVersion::V2) {
17171            __tmp.put_u64_le(self.time_usec);
17172            let len = __tmp.len();
17173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17174        } else {
17175            __tmp.len()
17176        }
17177    }
17178}
17179#[doc = "Temperature and humidity from hygrometer."]
17180#[doc = ""]
17181#[doc = "ID: 12920"]
17182#[derive(Debug, Clone, PartialEq)]
17183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17185#[cfg_attr(feature = "ts", derive(TS))]
17186#[cfg_attr(feature = "ts", ts(export))]
17187pub struct HYGROMETER_SENSOR_DATA {
17188    #[doc = "Temperature"]
17189    pub temperature: i16,
17190    #[doc = "Humidity"]
17191    pub humidity: u16,
17192    #[doc = "Hygrometer ID"]
17193    pub id: u8,
17194}
17195impl HYGROMETER_SENSOR_DATA {
17196    pub const ENCODED_LEN: usize = 5usize;
17197    pub const DEFAULT: Self = Self {
17198        temperature: 0_i16,
17199        humidity: 0_u16,
17200        id: 0_u8,
17201    };
17202    #[cfg(feature = "arbitrary")]
17203    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17204        use arbitrary::{Arbitrary, Unstructured};
17205        let mut buf = [0u8; 1024];
17206        rng.fill_bytes(&mut buf);
17207        let mut unstructured = Unstructured::new(&buf);
17208        Self::arbitrary(&mut unstructured).unwrap_or_default()
17209    }
17210}
17211impl Default for HYGROMETER_SENSOR_DATA {
17212    fn default() -> Self {
17213        Self::DEFAULT.clone()
17214    }
17215}
17216impl MessageData for HYGROMETER_SENSOR_DATA {
17217    type Message = MavMessage;
17218    const ID: u32 = 12920u32;
17219    const NAME: &'static str = "HYGROMETER_SENSOR";
17220    const EXTRA_CRC: u8 = 20u8;
17221    const ENCODED_LEN: usize = 5usize;
17222    fn deser(
17223        _version: MavlinkVersion,
17224        __input: &[u8],
17225    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17226        let avail_len = __input.len();
17227        let mut payload_buf = [0; Self::ENCODED_LEN];
17228        let mut buf = if avail_len < Self::ENCODED_LEN {
17229            payload_buf[0..avail_len].copy_from_slice(__input);
17230            Bytes::new(&payload_buf)
17231        } else {
17232            Bytes::new(__input)
17233        };
17234        let mut __struct = Self::default();
17235        __struct.temperature = buf.get_i16_le();
17236        __struct.humidity = buf.get_u16_le();
17237        __struct.id = buf.get_u8();
17238        Ok(__struct)
17239    }
17240    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17241        let mut __tmp = BytesMut::new(bytes);
17242        #[allow(clippy::absurd_extreme_comparisons)]
17243        #[allow(unused_comparisons)]
17244        if __tmp.remaining() < Self::ENCODED_LEN {
17245            panic!(
17246                "buffer is too small (need {} bytes, but got {})",
17247                Self::ENCODED_LEN,
17248                __tmp.remaining(),
17249            )
17250        }
17251        __tmp.put_i16_le(self.temperature);
17252        __tmp.put_u16_le(self.humidity);
17253        __tmp.put_u8(self.id);
17254        if matches!(version, MavlinkVersion::V2) {
17255            let len = __tmp.len();
17256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17257        } else {
17258            __tmp.len()
17259        }
17260    }
17261}
17262#[doc = "Illuminator status."]
17263#[doc = ""]
17264#[doc = "ID: 440"]
17265#[derive(Debug, Clone, PartialEq)]
17266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17268#[cfg_attr(feature = "ts", derive(TS))]
17269#[cfg_attr(feature = "ts", ts(export))]
17270pub struct ILLUMINATOR_STATUS_DATA {
17271    #[doc = "Time since the start-up of the illuminator in ms"]
17272    pub uptime_ms: u32,
17273    #[doc = "Errors"]
17274    pub error_status: IlluminatorErrorFlags,
17275    #[doc = "Illuminator brightness"]
17276    pub brightness: f32,
17277    #[doc = "Illuminator strobing period in seconds"]
17278    pub strobe_period: f32,
17279    #[doc = "Illuminator strobing duty cycle"]
17280    pub strobe_duty_cycle: f32,
17281    #[doc = "Temperature in Celsius"]
17282    pub temp_c: f32,
17283    #[doc = "Minimum strobing period in seconds"]
17284    pub min_strobe_period: f32,
17285    #[doc = "Maximum strobing period in seconds"]
17286    pub max_strobe_period: f32,
17287    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17288    pub enable: u8,
17289    #[doc = "Supported illuminator modes"]
17290    pub mode_bitmask: IlluminatorMode,
17291    #[doc = "Illuminator mode"]
17292    pub mode: IlluminatorMode,
17293}
17294impl ILLUMINATOR_STATUS_DATA {
17295    pub const ENCODED_LEN: usize = 35usize;
17296    pub const DEFAULT: Self = Self {
17297        uptime_ms: 0_u32,
17298        error_status: IlluminatorErrorFlags::DEFAULT,
17299        brightness: 0.0_f32,
17300        strobe_period: 0.0_f32,
17301        strobe_duty_cycle: 0.0_f32,
17302        temp_c: 0.0_f32,
17303        min_strobe_period: 0.0_f32,
17304        max_strobe_period: 0.0_f32,
17305        enable: 0_u8,
17306        mode_bitmask: IlluminatorMode::DEFAULT,
17307        mode: IlluminatorMode::DEFAULT,
17308    };
17309    #[cfg(feature = "arbitrary")]
17310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17311        use arbitrary::{Arbitrary, Unstructured};
17312        let mut buf = [0u8; 1024];
17313        rng.fill_bytes(&mut buf);
17314        let mut unstructured = Unstructured::new(&buf);
17315        Self::arbitrary(&mut unstructured).unwrap_or_default()
17316    }
17317}
17318impl Default for ILLUMINATOR_STATUS_DATA {
17319    fn default() -> Self {
17320        Self::DEFAULT.clone()
17321    }
17322}
17323impl MessageData for ILLUMINATOR_STATUS_DATA {
17324    type Message = MavMessage;
17325    const ID: u32 = 440u32;
17326    const NAME: &'static str = "ILLUMINATOR_STATUS";
17327    const EXTRA_CRC: u8 = 66u8;
17328    const ENCODED_LEN: usize = 35usize;
17329    fn deser(
17330        _version: MavlinkVersion,
17331        __input: &[u8],
17332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17333        let avail_len = __input.len();
17334        let mut payload_buf = [0; Self::ENCODED_LEN];
17335        let mut buf = if avail_len < Self::ENCODED_LEN {
17336            payload_buf[0..avail_len].copy_from_slice(__input);
17337            Bytes::new(&payload_buf)
17338        } else {
17339            Bytes::new(__input)
17340        };
17341        let mut __struct = Self::default();
17342        __struct.uptime_ms = buf.get_u32_le();
17343        let tmp = buf.get_u32_le();
17344        __struct.error_status = IlluminatorErrorFlags::from_bits(tmp).ok_or(
17345            ::mavlink_core::error::ParserError::InvalidFlag {
17346                flag_type: "IlluminatorErrorFlags",
17347                value: tmp as u64,
17348            },
17349        )?;
17350        __struct.brightness = buf.get_f32_le();
17351        __struct.strobe_period = buf.get_f32_le();
17352        __struct.strobe_duty_cycle = buf.get_f32_le();
17353        __struct.temp_c = buf.get_f32_le();
17354        __struct.min_strobe_period = buf.get_f32_le();
17355        __struct.max_strobe_period = buf.get_f32_le();
17356        __struct.enable = buf.get_u8();
17357        let tmp = buf.get_u8();
17358        __struct.mode_bitmask =
17359            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17360                enum_type: "IlluminatorMode",
17361                value: tmp as u64,
17362            })?;
17363        let tmp = buf.get_u8();
17364        __struct.mode =
17365            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17366                enum_type: "IlluminatorMode",
17367                value: tmp as u64,
17368            })?;
17369        Ok(__struct)
17370    }
17371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17372        let mut __tmp = BytesMut::new(bytes);
17373        #[allow(clippy::absurd_extreme_comparisons)]
17374        #[allow(unused_comparisons)]
17375        if __tmp.remaining() < Self::ENCODED_LEN {
17376            panic!(
17377                "buffer is too small (need {} bytes, but got {})",
17378                Self::ENCODED_LEN,
17379                __tmp.remaining(),
17380            )
17381        }
17382        __tmp.put_u32_le(self.uptime_ms);
17383        __tmp.put_u32_le(self.error_status.bits());
17384        __tmp.put_f32_le(self.brightness);
17385        __tmp.put_f32_le(self.strobe_period);
17386        __tmp.put_f32_le(self.strobe_duty_cycle);
17387        __tmp.put_f32_le(self.temp_c);
17388        __tmp.put_f32_le(self.min_strobe_period);
17389        __tmp.put_f32_le(self.max_strobe_period);
17390        __tmp.put_u8(self.enable);
17391        __tmp.put_u8(self.mode_bitmask as u8);
17392        __tmp.put_u8(self.mode as u8);
17393        if matches!(version, MavlinkVersion::V2) {
17394            let len = __tmp.len();
17395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17396        } else {
17397            __tmp.len()
17398        }
17399    }
17400}
17401#[doc = "Status of the Iridium SBD link."]
17402#[doc = ""]
17403#[doc = "ID: 335"]
17404#[derive(Debug, Clone, PartialEq)]
17405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17407#[cfg_attr(feature = "ts", derive(TS))]
17408#[cfg_attr(feature = "ts", ts(export))]
17409pub struct ISBD_LINK_STATUS_DATA {
17410    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17411    pub timestamp: u64,
17412    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17413    pub last_heartbeat: u64,
17414    #[doc = "Number of failed SBD sessions."]
17415    pub failed_sessions: u16,
17416    #[doc = "Number of successful SBD sessions."]
17417    pub successful_sessions: u16,
17418    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17419    pub signal_quality: u8,
17420    #[doc = "1: Ring call pending, 0: No call pending."]
17421    pub ring_pending: u8,
17422    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17423    pub tx_session_pending: u8,
17424    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17425    pub rx_session_pending: u8,
17426}
17427impl ISBD_LINK_STATUS_DATA {
17428    pub const ENCODED_LEN: usize = 24usize;
17429    pub const DEFAULT: Self = Self {
17430        timestamp: 0_u64,
17431        last_heartbeat: 0_u64,
17432        failed_sessions: 0_u16,
17433        successful_sessions: 0_u16,
17434        signal_quality: 0_u8,
17435        ring_pending: 0_u8,
17436        tx_session_pending: 0_u8,
17437        rx_session_pending: 0_u8,
17438    };
17439    #[cfg(feature = "arbitrary")]
17440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17441        use arbitrary::{Arbitrary, Unstructured};
17442        let mut buf = [0u8; 1024];
17443        rng.fill_bytes(&mut buf);
17444        let mut unstructured = Unstructured::new(&buf);
17445        Self::arbitrary(&mut unstructured).unwrap_or_default()
17446    }
17447}
17448impl Default for ISBD_LINK_STATUS_DATA {
17449    fn default() -> Self {
17450        Self::DEFAULT.clone()
17451    }
17452}
17453impl MessageData for ISBD_LINK_STATUS_DATA {
17454    type Message = MavMessage;
17455    const ID: u32 = 335u32;
17456    const NAME: &'static str = "ISBD_LINK_STATUS";
17457    const EXTRA_CRC: u8 = 225u8;
17458    const ENCODED_LEN: usize = 24usize;
17459    fn deser(
17460        _version: MavlinkVersion,
17461        __input: &[u8],
17462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17463        let avail_len = __input.len();
17464        let mut payload_buf = [0; Self::ENCODED_LEN];
17465        let mut buf = if avail_len < Self::ENCODED_LEN {
17466            payload_buf[0..avail_len].copy_from_slice(__input);
17467            Bytes::new(&payload_buf)
17468        } else {
17469            Bytes::new(__input)
17470        };
17471        let mut __struct = Self::default();
17472        __struct.timestamp = buf.get_u64_le();
17473        __struct.last_heartbeat = buf.get_u64_le();
17474        __struct.failed_sessions = buf.get_u16_le();
17475        __struct.successful_sessions = buf.get_u16_le();
17476        __struct.signal_quality = buf.get_u8();
17477        __struct.ring_pending = buf.get_u8();
17478        __struct.tx_session_pending = buf.get_u8();
17479        __struct.rx_session_pending = buf.get_u8();
17480        Ok(__struct)
17481    }
17482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17483        let mut __tmp = BytesMut::new(bytes);
17484        #[allow(clippy::absurd_extreme_comparisons)]
17485        #[allow(unused_comparisons)]
17486        if __tmp.remaining() < Self::ENCODED_LEN {
17487            panic!(
17488                "buffer is too small (need {} bytes, but got {})",
17489                Self::ENCODED_LEN,
17490                __tmp.remaining(),
17491            )
17492        }
17493        __tmp.put_u64_le(self.timestamp);
17494        __tmp.put_u64_le(self.last_heartbeat);
17495        __tmp.put_u16_le(self.failed_sessions);
17496        __tmp.put_u16_le(self.successful_sessions);
17497        __tmp.put_u8(self.signal_quality);
17498        __tmp.put_u8(self.ring_pending);
17499        __tmp.put_u8(self.tx_session_pending);
17500        __tmp.put_u8(self.rx_session_pending);
17501        if matches!(version, MavlinkVersion::V2) {
17502            let len = __tmp.len();
17503            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17504        } else {
17505            __tmp.len()
17506        }
17507    }
17508}
17509#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17510#[doc = ""]
17511#[doc = "ID: 149"]
17512#[derive(Debug, Clone, PartialEq)]
17513#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17514#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17515#[cfg_attr(feature = "ts", derive(TS))]
17516#[cfg_attr(feature = "ts", ts(export))]
17517pub struct LANDING_TARGET_DATA {
17518    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17519    pub time_usec: u64,
17520    #[doc = "X-axis angular offset of the target from the center of the image"]
17521    pub angle_x: f32,
17522    #[doc = "Y-axis angular offset of the target from the center of the image"]
17523    pub angle_y: f32,
17524    #[doc = "Distance to the target from the vehicle"]
17525    pub distance: f32,
17526    #[doc = "Size of target along x-axis"]
17527    pub size_x: f32,
17528    #[doc = "Size of target along y-axis"]
17529    pub size_y: f32,
17530    #[doc = "The ID of the target if multiple targets are present"]
17531    pub target_num: u8,
17532    #[doc = "Coordinate frame used for following fields."]
17533    pub frame: MavFrame,
17534    #[doc = "X Position of the landing target in MAV_FRAME"]
17535    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17536    pub x: f32,
17537    #[doc = "Y Position of the landing target in MAV_FRAME"]
17538    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17539    pub y: f32,
17540    #[doc = "Z Position of the landing target in MAV_FRAME"]
17541    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17542    pub z: f32,
17543    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17544    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17546    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17547    pub q: [f32; 4],
17548    #[doc = "Type of landing target"]
17549    #[cfg_attr(feature = "serde", serde(default))]
17550    pub mavtype: LandingTargetType,
17551    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17552    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17553    pub position_valid: u8,
17554}
17555impl LANDING_TARGET_DATA {
17556    pub const ENCODED_LEN: usize = 60usize;
17557    pub const DEFAULT: Self = Self {
17558        time_usec: 0_u64,
17559        angle_x: 0.0_f32,
17560        angle_y: 0.0_f32,
17561        distance: 0.0_f32,
17562        size_x: 0.0_f32,
17563        size_y: 0.0_f32,
17564        target_num: 0_u8,
17565        frame: MavFrame::DEFAULT,
17566        x: 0.0_f32,
17567        y: 0.0_f32,
17568        z: 0.0_f32,
17569        q: [0.0_f32; 4usize],
17570        mavtype: LandingTargetType::DEFAULT,
17571        position_valid: 0_u8,
17572    };
17573    #[cfg(feature = "arbitrary")]
17574    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17575        use arbitrary::{Arbitrary, Unstructured};
17576        let mut buf = [0u8; 1024];
17577        rng.fill_bytes(&mut buf);
17578        let mut unstructured = Unstructured::new(&buf);
17579        Self::arbitrary(&mut unstructured).unwrap_or_default()
17580    }
17581}
17582impl Default for LANDING_TARGET_DATA {
17583    fn default() -> Self {
17584        Self::DEFAULT.clone()
17585    }
17586}
17587impl MessageData for LANDING_TARGET_DATA {
17588    type Message = MavMessage;
17589    const ID: u32 = 149u32;
17590    const NAME: &'static str = "LANDING_TARGET";
17591    const EXTRA_CRC: u8 = 200u8;
17592    const ENCODED_LEN: usize = 60usize;
17593    fn deser(
17594        _version: MavlinkVersion,
17595        __input: &[u8],
17596    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17597        let avail_len = __input.len();
17598        let mut payload_buf = [0; Self::ENCODED_LEN];
17599        let mut buf = if avail_len < Self::ENCODED_LEN {
17600            payload_buf[0..avail_len].copy_from_slice(__input);
17601            Bytes::new(&payload_buf)
17602        } else {
17603            Bytes::new(__input)
17604        };
17605        let mut __struct = Self::default();
17606        __struct.time_usec = buf.get_u64_le();
17607        __struct.angle_x = buf.get_f32_le();
17608        __struct.angle_y = buf.get_f32_le();
17609        __struct.distance = buf.get_f32_le();
17610        __struct.size_x = buf.get_f32_le();
17611        __struct.size_y = buf.get_f32_le();
17612        __struct.target_num = buf.get_u8();
17613        let tmp = buf.get_u8();
17614        __struct.frame =
17615            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17616                enum_type: "MavFrame",
17617                value: tmp as u64,
17618            })?;
17619        __struct.x = buf.get_f32_le();
17620        __struct.y = buf.get_f32_le();
17621        __struct.z = buf.get_f32_le();
17622        for v in &mut __struct.q {
17623            let val = buf.get_f32_le();
17624            *v = val;
17625        }
17626        let tmp = buf.get_u8();
17627        __struct.mavtype =
17628            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17629                enum_type: "LandingTargetType",
17630                value: tmp as u64,
17631            })?;
17632        __struct.position_valid = buf.get_u8();
17633        Ok(__struct)
17634    }
17635    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17636        let mut __tmp = BytesMut::new(bytes);
17637        #[allow(clippy::absurd_extreme_comparisons)]
17638        #[allow(unused_comparisons)]
17639        if __tmp.remaining() < Self::ENCODED_LEN {
17640            panic!(
17641                "buffer is too small (need {} bytes, but got {})",
17642                Self::ENCODED_LEN,
17643                __tmp.remaining(),
17644            )
17645        }
17646        __tmp.put_u64_le(self.time_usec);
17647        __tmp.put_f32_le(self.angle_x);
17648        __tmp.put_f32_le(self.angle_y);
17649        __tmp.put_f32_le(self.distance);
17650        __tmp.put_f32_le(self.size_x);
17651        __tmp.put_f32_le(self.size_y);
17652        __tmp.put_u8(self.target_num);
17653        __tmp.put_u8(self.frame as u8);
17654        if matches!(version, MavlinkVersion::V2) {
17655            __tmp.put_f32_le(self.x);
17656            __tmp.put_f32_le(self.y);
17657            __tmp.put_f32_le(self.z);
17658            for val in &self.q {
17659                __tmp.put_f32_le(*val);
17660            }
17661            __tmp.put_u8(self.mavtype as u8);
17662            __tmp.put_u8(self.position_valid);
17663            let len = __tmp.len();
17664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17665        } else {
17666            __tmp.len()
17667        }
17668    }
17669}
17670#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17671#[doc = ""]
17672#[doc = "ID: 8"]
17673#[derive(Debug, Clone, PartialEq)]
17674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17676#[cfg_attr(feature = "ts", derive(TS))]
17677#[cfg_attr(feature = "ts", ts(export))]
17678pub struct LINK_NODE_STATUS_DATA {
17679    #[doc = "Timestamp (time since system boot)."]
17680    pub timestamp: u64,
17681    #[doc = "Transmit rate"]
17682    pub tx_rate: u32,
17683    #[doc = "Receive rate"]
17684    pub rx_rate: u32,
17685    #[doc = "Messages sent"]
17686    pub messages_sent: u32,
17687    #[doc = "Messages received (estimated from counting seq)"]
17688    pub messages_received: u32,
17689    #[doc = "Messages lost (estimated from counting seq)"]
17690    pub messages_lost: u32,
17691    #[doc = "Number of bytes that could not be parsed correctly."]
17692    pub rx_parse_err: u16,
17693    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17694    pub tx_overflows: u16,
17695    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17696    pub rx_overflows: u16,
17697    #[doc = "Remaining free transmit buffer space"]
17698    pub tx_buf: u8,
17699    #[doc = "Remaining free receive buffer space"]
17700    pub rx_buf: u8,
17701}
17702impl LINK_NODE_STATUS_DATA {
17703    pub const ENCODED_LEN: usize = 36usize;
17704    pub const DEFAULT: Self = Self {
17705        timestamp: 0_u64,
17706        tx_rate: 0_u32,
17707        rx_rate: 0_u32,
17708        messages_sent: 0_u32,
17709        messages_received: 0_u32,
17710        messages_lost: 0_u32,
17711        rx_parse_err: 0_u16,
17712        tx_overflows: 0_u16,
17713        rx_overflows: 0_u16,
17714        tx_buf: 0_u8,
17715        rx_buf: 0_u8,
17716    };
17717    #[cfg(feature = "arbitrary")]
17718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17719        use arbitrary::{Arbitrary, Unstructured};
17720        let mut buf = [0u8; 1024];
17721        rng.fill_bytes(&mut buf);
17722        let mut unstructured = Unstructured::new(&buf);
17723        Self::arbitrary(&mut unstructured).unwrap_or_default()
17724    }
17725}
17726impl Default for LINK_NODE_STATUS_DATA {
17727    fn default() -> Self {
17728        Self::DEFAULT.clone()
17729    }
17730}
17731impl MessageData for LINK_NODE_STATUS_DATA {
17732    type Message = MavMessage;
17733    const ID: u32 = 8u32;
17734    const NAME: &'static str = "LINK_NODE_STATUS";
17735    const EXTRA_CRC: u8 = 117u8;
17736    const ENCODED_LEN: usize = 36usize;
17737    fn deser(
17738        _version: MavlinkVersion,
17739        __input: &[u8],
17740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17741        let avail_len = __input.len();
17742        let mut payload_buf = [0; Self::ENCODED_LEN];
17743        let mut buf = if avail_len < Self::ENCODED_LEN {
17744            payload_buf[0..avail_len].copy_from_slice(__input);
17745            Bytes::new(&payload_buf)
17746        } else {
17747            Bytes::new(__input)
17748        };
17749        let mut __struct = Self::default();
17750        __struct.timestamp = buf.get_u64_le();
17751        __struct.tx_rate = buf.get_u32_le();
17752        __struct.rx_rate = buf.get_u32_le();
17753        __struct.messages_sent = buf.get_u32_le();
17754        __struct.messages_received = buf.get_u32_le();
17755        __struct.messages_lost = buf.get_u32_le();
17756        __struct.rx_parse_err = buf.get_u16_le();
17757        __struct.tx_overflows = buf.get_u16_le();
17758        __struct.rx_overflows = buf.get_u16_le();
17759        __struct.tx_buf = buf.get_u8();
17760        __struct.rx_buf = buf.get_u8();
17761        Ok(__struct)
17762    }
17763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17764        let mut __tmp = BytesMut::new(bytes);
17765        #[allow(clippy::absurd_extreme_comparisons)]
17766        #[allow(unused_comparisons)]
17767        if __tmp.remaining() < Self::ENCODED_LEN {
17768            panic!(
17769                "buffer is too small (need {} bytes, but got {})",
17770                Self::ENCODED_LEN,
17771                __tmp.remaining(),
17772            )
17773        }
17774        __tmp.put_u64_le(self.timestamp);
17775        __tmp.put_u32_le(self.tx_rate);
17776        __tmp.put_u32_le(self.rx_rate);
17777        __tmp.put_u32_le(self.messages_sent);
17778        __tmp.put_u32_le(self.messages_received);
17779        __tmp.put_u32_le(self.messages_lost);
17780        __tmp.put_u16_le(self.rx_parse_err);
17781        __tmp.put_u16_le(self.tx_overflows);
17782        __tmp.put_u16_le(self.rx_overflows);
17783        __tmp.put_u8(self.tx_buf);
17784        __tmp.put_u8(self.rx_buf);
17785        if matches!(version, MavlinkVersion::V2) {
17786            let len = __tmp.len();
17787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17788        } else {
17789            __tmp.len()
17790        }
17791    }
17792}
17793#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17794#[doc = ""]
17795#[doc = "ID: 32"]
17796#[derive(Debug, Clone, PartialEq)]
17797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17799#[cfg_attr(feature = "ts", derive(TS))]
17800#[cfg_attr(feature = "ts", ts(export))]
17801pub struct LOCAL_POSITION_NED_DATA {
17802    #[doc = "Timestamp (time since system boot)."]
17803    pub time_boot_ms: u32,
17804    #[doc = "X Position"]
17805    pub x: f32,
17806    #[doc = "Y Position"]
17807    pub y: f32,
17808    #[doc = "Z Position"]
17809    pub z: f32,
17810    #[doc = "X Speed"]
17811    pub vx: f32,
17812    #[doc = "Y Speed"]
17813    pub vy: f32,
17814    #[doc = "Z Speed"]
17815    pub vz: f32,
17816}
17817impl LOCAL_POSITION_NED_DATA {
17818    pub const ENCODED_LEN: usize = 28usize;
17819    pub const DEFAULT: Self = Self {
17820        time_boot_ms: 0_u32,
17821        x: 0.0_f32,
17822        y: 0.0_f32,
17823        z: 0.0_f32,
17824        vx: 0.0_f32,
17825        vy: 0.0_f32,
17826        vz: 0.0_f32,
17827    };
17828    #[cfg(feature = "arbitrary")]
17829    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17830        use arbitrary::{Arbitrary, Unstructured};
17831        let mut buf = [0u8; 1024];
17832        rng.fill_bytes(&mut buf);
17833        let mut unstructured = Unstructured::new(&buf);
17834        Self::arbitrary(&mut unstructured).unwrap_or_default()
17835    }
17836}
17837impl Default for LOCAL_POSITION_NED_DATA {
17838    fn default() -> Self {
17839        Self::DEFAULT.clone()
17840    }
17841}
17842impl MessageData for LOCAL_POSITION_NED_DATA {
17843    type Message = MavMessage;
17844    const ID: u32 = 32u32;
17845    const NAME: &'static str = "LOCAL_POSITION_NED";
17846    const EXTRA_CRC: u8 = 185u8;
17847    const ENCODED_LEN: usize = 28usize;
17848    fn deser(
17849        _version: MavlinkVersion,
17850        __input: &[u8],
17851    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17852        let avail_len = __input.len();
17853        let mut payload_buf = [0; Self::ENCODED_LEN];
17854        let mut buf = if avail_len < Self::ENCODED_LEN {
17855            payload_buf[0..avail_len].copy_from_slice(__input);
17856            Bytes::new(&payload_buf)
17857        } else {
17858            Bytes::new(__input)
17859        };
17860        let mut __struct = Self::default();
17861        __struct.time_boot_ms = buf.get_u32_le();
17862        __struct.x = buf.get_f32_le();
17863        __struct.y = buf.get_f32_le();
17864        __struct.z = buf.get_f32_le();
17865        __struct.vx = buf.get_f32_le();
17866        __struct.vy = buf.get_f32_le();
17867        __struct.vz = buf.get_f32_le();
17868        Ok(__struct)
17869    }
17870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17871        let mut __tmp = BytesMut::new(bytes);
17872        #[allow(clippy::absurd_extreme_comparisons)]
17873        #[allow(unused_comparisons)]
17874        if __tmp.remaining() < Self::ENCODED_LEN {
17875            panic!(
17876                "buffer is too small (need {} bytes, but got {})",
17877                Self::ENCODED_LEN,
17878                __tmp.remaining(),
17879            )
17880        }
17881        __tmp.put_u32_le(self.time_boot_ms);
17882        __tmp.put_f32_le(self.x);
17883        __tmp.put_f32_le(self.y);
17884        __tmp.put_f32_le(self.z);
17885        __tmp.put_f32_le(self.vx);
17886        __tmp.put_f32_le(self.vy);
17887        __tmp.put_f32_le(self.vz);
17888        if matches!(version, MavlinkVersion::V2) {
17889            let len = __tmp.len();
17890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17891        } else {
17892            __tmp.len()
17893        }
17894    }
17895}
17896#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17897#[doc = ""]
17898#[doc = "ID: 64"]
17899#[derive(Debug, Clone, PartialEq)]
17900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17902#[cfg_attr(feature = "ts", derive(TS))]
17903#[cfg_attr(feature = "ts", ts(export))]
17904pub struct LOCAL_POSITION_NED_COV_DATA {
17905    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17906    pub time_usec: u64,
17907    #[doc = "X Position"]
17908    pub x: f32,
17909    #[doc = "Y Position"]
17910    pub y: f32,
17911    #[doc = "Z Position"]
17912    pub z: f32,
17913    #[doc = "X Speed"]
17914    pub vx: f32,
17915    #[doc = "Y Speed"]
17916    pub vy: f32,
17917    #[doc = "Z Speed"]
17918    pub vz: f32,
17919    #[doc = "X Acceleration"]
17920    pub ax: f32,
17921    #[doc = "Y Acceleration"]
17922    pub ay: f32,
17923    #[doc = "Z Acceleration"]
17924    pub az: f32,
17925    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17926    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17927    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17928    pub covariance: [f32; 45],
17929    #[doc = "Class id of the estimator this estimate originated from."]
17930    pub estimator_type: MavEstimatorType,
17931}
17932impl LOCAL_POSITION_NED_COV_DATA {
17933    pub const ENCODED_LEN: usize = 225usize;
17934    pub const DEFAULT: Self = Self {
17935        time_usec: 0_u64,
17936        x: 0.0_f32,
17937        y: 0.0_f32,
17938        z: 0.0_f32,
17939        vx: 0.0_f32,
17940        vy: 0.0_f32,
17941        vz: 0.0_f32,
17942        ax: 0.0_f32,
17943        ay: 0.0_f32,
17944        az: 0.0_f32,
17945        covariance: [0.0_f32; 45usize],
17946        estimator_type: MavEstimatorType::DEFAULT,
17947    };
17948    #[cfg(feature = "arbitrary")]
17949    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17950        use arbitrary::{Arbitrary, Unstructured};
17951        let mut buf = [0u8; 1024];
17952        rng.fill_bytes(&mut buf);
17953        let mut unstructured = Unstructured::new(&buf);
17954        Self::arbitrary(&mut unstructured).unwrap_or_default()
17955    }
17956}
17957impl Default for LOCAL_POSITION_NED_COV_DATA {
17958    fn default() -> Self {
17959        Self::DEFAULT.clone()
17960    }
17961}
17962impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17963    type Message = MavMessage;
17964    const ID: u32 = 64u32;
17965    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17966    const EXTRA_CRC: u8 = 191u8;
17967    const ENCODED_LEN: usize = 225usize;
17968    fn deser(
17969        _version: MavlinkVersion,
17970        __input: &[u8],
17971    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17972        let avail_len = __input.len();
17973        let mut payload_buf = [0; Self::ENCODED_LEN];
17974        let mut buf = if avail_len < Self::ENCODED_LEN {
17975            payload_buf[0..avail_len].copy_from_slice(__input);
17976            Bytes::new(&payload_buf)
17977        } else {
17978            Bytes::new(__input)
17979        };
17980        let mut __struct = Self::default();
17981        __struct.time_usec = buf.get_u64_le();
17982        __struct.x = buf.get_f32_le();
17983        __struct.y = buf.get_f32_le();
17984        __struct.z = buf.get_f32_le();
17985        __struct.vx = buf.get_f32_le();
17986        __struct.vy = buf.get_f32_le();
17987        __struct.vz = buf.get_f32_le();
17988        __struct.ax = buf.get_f32_le();
17989        __struct.ay = buf.get_f32_le();
17990        __struct.az = buf.get_f32_le();
17991        for v in &mut __struct.covariance {
17992            let val = buf.get_f32_le();
17993            *v = val;
17994        }
17995        let tmp = buf.get_u8();
17996        __struct.estimator_type =
17997            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17998                enum_type: "MavEstimatorType",
17999                value: tmp as u64,
18000            })?;
18001        Ok(__struct)
18002    }
18003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18004        let mut __tmp = BytesMut::new(bytes);
18005        #[allow(clippy::absurd_extreme_comparisons)]
18006        #[allow(unused_comparisons)]
18007        if __tmp.remaining() < Self::ENCODED_LEN {
18008            panic!(
18009                "buffer is too small (need {} bytes, but got {})",
18010                Self::ENCODED_LEN,
18011                __tmp.remaining(),
18012            )
18013        }
18014        __tmp.put_u64_le(self.time_usec);
18015        __tmp.put_f32_le(self.x);
18016        __tmp.put_f32_le(self.y);
18017        __tmp.put_f32_le(self.z);
18018        __tmp.put_f32_le(self.vx);
18019        __tmp.put_f32_le(self.vy);
18020        __tmp.put_f32_le(self.vz);
18021        __tmp.put_f32_le(self.ax);
18022        __tmp.put_f32_le(self.ay);
18023        __tmp.put_f32_le(self.az);
18024        for val in &self.covariance {
18025            __tmp.put_f32_le(*val);
18026        }
18027        __tmp.put_u8(self.estimator_type as u8);
18028        if matches!(version, MavlinkVersion::V2) {
18029            let len = __tmp.len();
18030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18031        } else {
18032            __tmp.len()
18033        }
18034    }
18035}
18036#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18037#[doc = ""]
18038#[doc = "ID: 89"]
18039#[derive(Debug, Clone, PartialEq)]
18040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18042#[cfg_attr(feature = "ts", derive(TS))]
18043#[cfg_attr(feature = "ts", ts(export))]
18044pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18045    #[doc = "Timestamp (time since system boot)."]
18046    pub time_boot_ms: u32,
18047    #[doc = "X Position"]
18048    pub x: f32,
18049    #[doc = "Y Position"]
18050    pub y: f32,
18051    #[doc = "Z Position"]
18052    pub z: f32,
18053    #[doc = "Roll"]
18054    pub roll: f32,
18055    #[doc = "Pitch"]
18056    pub pitch: f32,
18057    #[doc = "Yaw"]
18058    pub yaw: f32,
18059}
18060impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18061    pub const ENCODED_LEN: usize = 28usize;
18062    pub const DEFAULT: Self = Self {
18063        time_boot_ms: 0_u32,
18064        x: 0.0_f32,
18065        y: 0.0_f32,
18066        z: 0.0_f32,
18067        roll: 0.0_f32,
18068        pitch: 0.0_f32,
18069        yaw: 0.0_f32,
18070    };
18071    #[cfg(feature = "arbitrary")]
18072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18073        use arbitrary::{Arbitrary, Unstructured};
18074        let mut buf = [0u8; 1024];
18075        rng.fill_bytes(&mut buf);
18076        let mut unstructured = Unstructured::new(&buf);
18077        Self::arbitrary(&mut unstructured).unwrap_or_default()
18078    }
18079}
18080impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18081    fn default() -> Self {
18082        Self::DEFAULT.clone()
18083    }
18084}
18085impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18086    type Message = MavMessage;
18087    const ID: u32 = 89u32;
18088    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18089    const EXTRA_CRC: u8 = 231u8;
18090    const ENCODED_LEN: usize = 28usize;
18091    fn deser(
18092        _version: MavlinkVersion,
18093        __input: &[u8],
18094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18095        let avail_len = __input.len();
18096        let mut payload_buf = [0; Self::ENCODED_LEN];
18097        let mut buf = if avail_len < Self::ENCODED_LEN {
18098            payload_buf[0..avail_len].copy_from_slice(__input);
18099            Bytes::new(&payload_buf)
18100        } else {
18101            Bytes::new(__input)
18102        };
18103        let mut __struct = Self::default();
18104        __struct.time_boot_ms = buf.get_u32_le();
18105        __struct.x = buf.get_f32_le();
18106        __struct.y = buf.get_f32_le();
18107        __struct.z = buf.get_f32_le();
18108        __struct.roll = buf.get_f32_le();
18109        __struct.pitch = buf.get_f32_le();
18110        __struct.yaw = buf.get_f32_le();
18111        Ok(__struct)
18112    }
18113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18114        let mut __tmp = BytesMut::new(bytes);
18115        #[allow(clippy::absurd_extreme_comparisons)]
18116        #[allow(unused_comparisons)]
18117        if __tmp.remaining() < Self::ENCODED_LEN {
18118            panic!(
18119                "buffer is too small (need {} bytes, but got {})",
18120                Self::ENCODED_LEN,
18121                __tmp.remaining(),
18122            )
18123        }
18124        __tmp.put_u32_le(self.time_boot_ms);
18125        __tmp.put_f32_le(self.x);
18126        __tmp.put_f32_le(self.y);
18127        __tmp.put_f32_le(self.z);
18128        __tmp.put_f32_le(self.roll);
18129        __tmp.put_f32_le(self.pitch);
18130        __tmp.put_f32_le(self.yaw);
18131        if matches!(version, MavlinkVersion::V2) {
18132            let len = __tmp.len();
18133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18134        } else {
18135            __tmp.len()
18136        }
18137    }
18138}
18139#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18140#[doc = ""]
18141#[doc = "ID: 268"]
18142#[derive(Debug, Clone, PartialEq)]
18143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18145#[cfg_attr(feature = "ts", derive(TS))]
18146#[cfg_attr(feature = "ts", ts(export))]
18147pub struct LOGGING_ACK_DATA {
18148    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18149    pub sequence: u16,
18150    #[doc = "system ID of the target"]
18151    pub target_system: u8,
18152    #[doc = "component ID of the target"]
18153    pub target_component: u8,
18154}
18155impl LOGGING_ACK_DATA {
18156    pub const ENCODED_LEN: usize = 4usize;
18157    pub const DEFAULT: Self = Self {
18158        sequence: 0_u16,
18159        target_system: 0_u8,
18160        target_component: 0_u8,
18161    };
18162    #[cfg(feature = "arbitrary")]
18163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18164        use arbitrary::{Arbitrary, Unstructured};
18165        let mut buf = [0u8; 1024];
18166        rng.fill_bytes(&mut buf);
18167        let mut unstructured = Unstructured::new(&buf);
18168        Self::arbitrary(&mut unstructured).unwrap_or_default()
18169    }
18170}
18171impl Default for LOGGING_ACK_DATA {
18172    fn default() -> Self {
18173        Self::DEFAULT.clone()
18174    }
18175}
18176impl MessageData for LOGGING_ACK_DATA {
18177    type Message = MavMessage;
18178    const ID: u32 = 268u32;
18179    const NAME: &'static str = "LOGGING_ACK";
18180    const EXTRA_CRC: u8 = 14u8;
18181    const ENCODED_LEN: usize = 4usize;
18182    fn deser(
18183        _version: MavlinkVersion,
18184        __input: &[u8],
18185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18186        let avail_len = __input.len();
18187        let mut payload_buf = [0; Self::ENCODED_LEN];
18188        let mut buf = if avail_len < Self::ENCODED_LEN {
18189            payload_buf[0..avail_len].copy_from_slice(__input);
18190            Bytes::new(&payload_buf)
18191        } else {
18192            Bytes::new(__input)
18193        };
18194        let mut __struct = Self::default();
18195        __struct.sequence = buf.get_u16_le();
18196        __struct.target_system = buf.get_u8();
18197        __struct.target_component = buf.get_u8();
18198        Ok(__struct)
18199    }
18200    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18201        let mut __tmp = BytesMut::new(bytes);
18202        #[allow(clippy::absurd_extreme_comparisons)]
18203        #[allow(unused_comparisons)]
18204        if __tmp.remaining() < Self::ENCODED_LEN {
18205            panic!(
18206                "buffer is too small (need {} bytes, but got {})",
18207                Self::ENCODED_LEN,
18208                __tmp.remaining(),
18209            )
18210        }
18211        __tmp.put_u16_le(self.sequence);
18212        __tmp.put_u8(self.target_system);
18213        __tmp.put_u8(self.target_component);
18214        if matches!(version, MavlinkVersion::V2) {
18215            let len = __tmp.len();
18216            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18217        } else {
18218            __tmp.len()
18219        }
18220    }
18221}
18222#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18223#[doc = ""]
18224#[doc = "ID: 266"]
18225#[derive(Debug, Clone, PartialEq)]
18226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18228#[cfg_attr(feature = "ts", derive(TS))]
18229#[cfg_attr(feature = "ts", ts(export))]
18230pub struct LOGGING_DATA_DATA {
18231    #[doc = "sequence number (can wrap)"]
18232    pub sequence: u16,
18233    #[doc = "system ID of the target"]
18234    pub target_system: u8,
18235    #[doc = "component ID of the target"]
18236    pub target_component: u8,
18237    #[doc = "data length"]
18238    pub length: u8,
18239    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18240    pub first_message_offset: u8,
18241    #[doc = "logged data"]
18242    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18243    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18244    pub data: [u8; 249],
18245}
18246impl LOGGING_DATA_DATA {
18247    pub const ENCODED_LEN: usize = 255usize;
18248    pub const DEFAULT: Self = Self {
18249        sequence: 0_u16,
18250        target_system: 0_u8,
18251        target_component: 0_u8,
18252        length: 0_u8,
18253        first_message_offset: 0_u8,
18254        data: [0_u8; 249usize],
18255    };
18256    #[cfg(feature = "arbitrary")]
18257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18258        use arbitrary::{Arbitrary, Unstructured};
18259        let mut buf = [0u8; 1024];
18260        rng.fill_bytes(&mut buf);
18261        let mut unstructured = Unstructured::new(&buf);
18262        Self::arbitrary(&mut unstructured).unwrap_or_default()
18263    }
18264}
18265impl Default for LOGGING_DATA_DATA {
18266    fn default() -> Self {
18267        Self::DEFAULT.clone()
18268    }
18269}
18270impl MessageData for LOGGING_DATA_DATA {
18271    type Message = MavMessage;
18272    const ID: u32 = 266u32;
18273    const NAME: &'static str = "LOGGING_DATA";
18274    const EXTRA_CRC: u8 = 193u8;
18275    const ENCODED_LEN: usize = 255usize;
18276    fn deser(
18277        _version: MavlinkVersion,
18278        __input: &[u8],
18279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18280        let avail_len = __input.len();
18281        let mut payload_buf = [0; Self::ENCODED_LEN];
18282        let mut buf = if avail_len < Self::ENCODED_LEN {
18283            payload_buf[0..avail_len].copy_from_slice(__input);
18284            Bytes::new(&payload_buf)
18285        } else {
18286            Bytes::new(__input)
18287        };
18288        let mut __struct = Self::default();
18289        __struct.sequence = buf.get_u16_le();
18290        __struct.target_system = buf.get_u8();
18291        __struct.target_component = buf.get_u8();
18292        __struct.length = buf.get_u8();
18293        __struct.first_message_offset = buf.get_u8();
18294        for v in &mut __struct.data {
18295            let val = buf.get_u8();
18296            *v = val;
18297        }
18298        Ok(__struct)
18299    }
18300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18301        let mut __tmp = BytesMut::new(bytes);
18302        #[allow(clippy::absurd_extreme_comparisons)]
18303        #[allow(unused_comparisons)]
18304        if __tmp.remaining() < Self::ENCODED_LEN {
18305            panic!(
18306                "buffer is too small (need {} bytes, but got {})",
18307                Self::ENCODED_LEN,
18308                __tmp.remaining(),
18309            )
18310        }
18311        __tmp.put_u16_le(self.sequence);
18312        __tmp.put_u8(self.target_system);
18313        __tmp.put_u8(self.target_component);
18314        __tmp.put_u8(self.length);
18315        __tmp.put_u8(self.first_message_offset);
18316        for val in &self.data {
18317            __tmp.put_u8(*val);
18318        }
18319        if matches!(version, MavlinkVersion::V2) {
18320            let len = __tmp.len();
18321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18322        } else {
18323            __tmp.len()
18324        }
18325    }
18326}
18327#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18328#[doc = ""]
18329#[doc = "ID: 267"]
18330#[derive(Debug, Clone, PartialEq)]
18331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18333#[cfg_attr(feature = "ts", derive(TS))]
18334#[cfg_attr(feature = "ts", ts(export))]
18335pub struct LOGGING_DATA_ACKED_DATA {
18336    #[doc = "sequence number (can wrap)"]
18337    pub sequence: u16,
18338    #[doc = "system ID of the target"]
18339    pub target_system: u8,
18340    #[doc = "component ID of the target"]
18341    pub target_component: u8,
18342    #[doc = "data length"]
18343    pub length: u8,
18344    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18345    pub first_message_offset: u8,
18346    #[doc = "logged data"]
18347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18348    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18349    pub data: [u8; 249],
18350}
18351impl LOGGING_DATA_ACKED_DATA {
18352    pub const ENCODED_LEN: usize = 255usize;
18353    pub const DEFAULT: Self = Self {
18354        sequence: 0_u16,
18355        target_system: 0_u8,
18356        target_component: 0_u8,
18357        length: 0_u8,
18358        first_message_offset: 0_u8,
18359        data: [0_u8; 249usize],
18360    };
18361    #[cfg(feature = "arbitrary")]
18362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18363        use arbitrary::{Arbitrary, Unstructured};
18364        let mut buf = [0u8; 1024];
18365        rng.fill_bytes(&mut buf);
18366        let mut unstructured = Unstructured::new(&buf);
18367        Self::arbitrary(&mut unstructured).unwrap_or_default()
18368    }
18369}
18370impl Default for LOGGING_DATA_ACKED_DATA {
18371    fn default() -> Self {
18372        Self::DEFAULT.clone()
18373    }
18374}
18375impl MessageData for LOGGING_DATA_ACKED_DATA {
18376    type Message = MavMessage;
18377    const ID: u32 = 267u32;
18378    const NAME: &'static str = "LOGGING_DATA_ACKED";
18379    const EXTRA_CRC: u8 = 35u8;
18380    const ENCODED_LEN: usize = 255usize;
18381    fn deser(
18382        _version: MavlinkVersion,
18383        __input: &[u8],
18384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18385        let avail_len = __input.len();
18386        let mut payload_buf = [0; Self::ENCODED_LEN];
18387        let mut buf = if avail_len < Self::ENCODED_LEN {
18388            payload_buf[0..avail_len].copy_from_slice(__input);
18389            Bytes::new(&payload_buf)
18390        } else {
18391            Bytes::new(__input)
18392        };
18393        let mut __struct = Self::default();
18394        __struct.sequence = buf.get_u16_le();
18395        __struct.target_system = buf.get_u8();
18396        __struct.target_component = buf.get_u8();
18397        __struct.length = buf.get_u8();
18398        __struct.first_message_offset = buf.get_u8();
18399        for v in &mut __struct.data {
18400            let val = buf.get_u8();
18401            *v = val;
18402        }
18403        Ok(__struct)
18404    }
18405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18406        let mut __tmp = BytesMut::new(bytes);
18407        #[allow(clippy::absurd_extreme_comparisons)]
18408        #[allow(unused_comparisons)]
18409        if __tmp.remaining() < Self::ENCODED_LEN {
18410            panic!(
18411                "buffer is too small (need {} bytes, but got {})",
18412                Self::ENCODED_LEN,
18413                __tmp.remaining(),
18414            )
18415        }
18416        __tmp.put_u16_le(self.sequence);
18417        __tmp.put_u8(self.target_system);
18418        __tmp.put_u8(self.target_component);
18419        __tmp.put_u8(self.length);
18420        __tmp.put_u8(self.first_message_offset);
18421        for val in &self.data {
18422            __tmp.put_u8(*val);
18423        }
18424        if matches!(version, MavlinkVersion::V2) {
18425            let len = __tmp.len();
18426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18427        } else {
18428            __tmp.len()
18429        }
18430    }
18431}
18432#[doc = "Reply to LOG_REQUEST_DATA."]
18433#[doc = ""]
18434#[doc = "ID: 120"]
18435#[derive(Debug, Clone, PartialEq)]
18436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18438#[cfg_attr(feature = "ts", derive(TS))]
18439#[cfg_attr(feature = "ts", ts(export))]
18440pub struct LOG_DATA_DATA {
18441    #[doc = "Offset into the log"]
18442    pub ofs: u32,
18443    #[doc = "Log id (from LOG_ENTRY reply)"]
18444    pub id: u16,
18445    #[doc = "Number of bytes (zero for end of log)"]
18446    pub count: u8,
18447    #[doc = "log data"]
18448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18450    pub data: [u8; 90],
18451}
18452impl LOG_DATA_DATA {
18453    pub const ENCODED_LEN: usize = 97usize;
18454    pub const DEFAULT: Self = Self {
18455        ofs: 0_u32,
18456        id: 0_u16,
18457        count: 0_u8,
18458        data: [0_u8; 90usize],
18459    };
18460    #[cfg(feature = "arbitrary")]
18461    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18462        use arbitrary::{Arbitrary, Unstructured};
18463        let mut buf = [0u8; 1024];
18464        rng.fill_bytes(&mut buf);
18465        let mut unstructured = Unstructured::new(&buf);
18466        Self::arbitrary(&mut unstructured).unwrap_or_default()
18467    }
18468}
18469impl Default for LOG_DATA_DATA {
18470    fn default() -> Self {
18471        Self::DEFAULT.clone()
18472    }
18473}
18474impl MessageData for LOG_DATA_DATA {
18475    type Message = MavMessage;
18476    const ID: u32 = 120u32;
18477    const NAME: &'static str = "LOG_DATA";
18478    const EXTRA_CRC: u8 = 134u8;
18479    const ENCODED_LEN: usize = 97usize;
18480    fn deser(
18481        _version: MavlinkVersion,
18482        __input: &[u8],
18483    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18484        let avail_len = __input.len();
18485        let mut payload_buf = [0; Self::ENCODED_LEN];
18486        let mut buf = if avail_len < Self::ENCODED_LEN {
18487            payload_buf[0..avail_len].copy_from_slice(__input);
18488            Bytes::new(&payload_buf)
18489        } else {
18490            Bytes::new(__input)
18491        };
18492        let mut __struct = Self::default();
18493        __struct.ofs = buf.get_u32_le();
18494        __struct.id = buf.get_u16_le();
18495        __struct.count = buf.get_u8();
18496        for v in &mut __struct.data {
18497            let val = buf.get_u8();
18498            *v = val;
18499        }
18500        Ok(__struct)
18501    }
18502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18503        let mut __tmp = BytesMut::new(bytes);
18504        #[allow(clippy::absurd_extreme_comparisons)]
18505        #[allow(unused_comparisons)]
18506        if __tmp.remaining() < Self::ENCODED_LEN {
18507            panic!(
18508                "buffer is too small (need {} bytes, but got {})",
18509                Self::ENCODED_LEN,
18510                __tmp.remaining(),
18511            )
18512        }
18513        __tmp.put_u32_le(self.ofs);
18514        __tmp.put_u16_le(self.id);
18515        __tmp.put_u8(self.count);
18516        for val in &self.data {
18517            __tmp.put_u8(*val);
18518        }
18519        if matches!(version, MavlinkVersion::V2) {
18520            let len = __tmp.len();
18521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18522        } else {
18523            __tmp.len()
18524        }
18525    }
18526}
18527#[doc = "Reply to LOG_REQUEST_LIST."]
18528#[doc = ""]
18529#[doc = "ID: 118"]
18530#[derive(Debug, Clone, PartialEq)]
18531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18533#[cfg_attr(feature = "ts", derive(TS))]
18534#[cfg_attr(feature = "ts", ts(export))]
18535pub struct LOG_ENTRY_DATA {
18536    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18537    pub time_utc: u32,
18538    #[doc = "Size of the log (may be approximate)"]
18539    pub size: u32,
18540    #[doc = "Log id"]
18541    pub id: u16,
18542    #[doc = "Total number of logs"]
18543    pub num_logs: u16,
18544    #[doc = "High log number"]
18545    pub last_log_num: u16,
18546}
18547impl LOG_ENTRY_DATA {
18548    pub const ENCODED_LEN: usize = 14usize;
18549    pub const DEFAULT: Self = Self {
18550        time_utc: 0_u32,
18551        size: 0_u32,
18552        id: 0_u16,
18553        num_logs: 0_u16,
18554        last_log_num: 0_u16,
18555    };
18556    #[cfg(feature = "arbitrary")]
18557    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18558        use arbitrary::{Arbitrary, Unstructured};
18559        let mut buf = [0u8; 1024];
18560        rng.fill_bytes(&mut buf);
18561        let mut unstructured = Unstructured::new(&buf);
18562        Self::arbitrary(&mut unstructured).unwrap_or_default()
18563    }
18564}
18565impl Default for LOG_ENTRY_DATA {
18566    fn default() -> Self {
18567        Self::DEFAULT.clone()
18568    }
18569}
18570impl MessageData for LOG_ENTRY_DATA {
18571    type Message = MavMessage;
18572    const ID: u32 = 118u32;
18573    const NAME: &'static str = "LOG_ENTRY";
18574    const EXTRA_CRC: u8 = 56u8;
18575    const ENCODED_LEN: usize = 14usize;
18576    fn deser(
18577        _version: MavlinkVersion,
18578        __input: &[u8],
18579    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18580        let avail_len = __input.len();
18581        let mut payload_buf = [0; Self::ENCODED_LEN];
18582        let mut buf = if avail_len < Self::ENCODED_LEN {
18583            payload_buf[0..avail_len].copy_from_slice(__input);
18584            Bytes::new(&payload_buf)
18585        } else {
18586            Bytes::new(__input)
18587        };
18588        let mut __struct = Self::default();
18589        __struct.time_utc = buf.get_u32_le();
18590        __struct.size = buf.get_u32_le();
18591        __struct.id = buf.get_u16_le();
18592        __struct.num_logs = buf.get_u16_le();
18593        __struct.last_log_num = buf.get_u16_le();
18594        Ok(__struct)
18595    }
18596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18597        let mut __tmp = BytesMut::new(bytes);
18598        #[allow(clippy::absurd_extreme_comparisons)]
18599        #[allow(unused_comparisons)]
18600        if __tmp.remaining() < Self::ENCODED_LEN {
18601            panic!(
18602                "buffer is too small (need {} bytes, but got {})",
18603                Self::ENCODED_LEN,
18604                __tmp.remaining(),
18605            )
18606        }
18607        __tmp.put_u32_le(self.time_utc);
18608        __tmp.put_u32_le(self.size);
18609        __tmp.put_u16_le(self.id);
18610        __tmp.put_u16_le(self.num_logs);
18611        __tmp.put_u16_le(self.last_log_num);
18612        if matches!(version, MavlinkVersion::V2) {
18613            let len = __tmp.len();
18614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18615        } else {
18616            __tmp.len()
18617        }
18618    }
18619}
18620#[doc = "Erase all logs."]
18621#[doc = ""]
18622#[doc = "ID: 121"]
18623#[derive(Debug, Clone, PartialEq)]
18624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18626#[cfg_attr(feature = "ts", derive(TS))]
18627#[cfg_attr(feature = "ts", ts(export))]
18628pub struct LOG_ERASE_DATA {
18629    #[doc = "System ID"]
18630    pub target_system: u8,
18631    #[doc = "Component ID"]
18632    pub target_component: u8,
18633}
18634impl LOG_ERASE_DATA {
18635    pub const ENCODED_LEN: usize = 2usize;
18636    pub const DEFAULT: Self = Self {
18637        target_system: 0_u8,
18638        target_component: 0_u8,
18639    };
18640    #[cfg(feature = "arbitrary")]
18641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18642        use arbitrary::{Arbitrary, Unstructured};
18643        let mut buf = [0u8; 1024];
18644        rng.fill_bytes(&mut buf);
18645        let mut unstructured = Unstructured::new(&buf);
18646        Self::arbitrary(&mut unstructured).unwrap_or_default()
18647    }
18648}
18649impl Default for LOG_ERASE_DATA {
18650    fn default() -> Self {
18651        Self::DEFAULT.clone()
18652    }
18653}
18654impl MessageData for LOG_ERASE_DATA {
18655    type Message = MavMessage;
18656    const ID: u32 = 121u32;
18657    const NAME: &'static str = "LOG_ERASE";
18658    const EXTRA_CRC: u8 = 237u8;
18659    const ENCODED_LEN: usize = 2usize;
18660    fn deser(
18661        _version: MavlinkVersion,
18662        __input: &[u8],
18663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18664        let avail_len = __input.len();
18665        let mut payload_buf = [0; Self::ENCODED_LEN];
18666        let mut buf = if avail_len < Self::ENCODED_LEN {
18667            payload_buf[0..avail_len].copy_from_slice(__input);
18668            Bytes::new(&payload_buf)
18669        } else {
18670            Bytes::new(__input)
18671        };
18672        let mut __struct = Self::default();
18673        __struct.target_system = buf.get_u8();
18674        __struct.target_component = buf.get_u8();
18675        Ok(__struct)
18676    }
18677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18678        let mut __tmp = BytesMut::new(bytes);
18679        #[allow(clippy::absurd_extreme_comparisons)]
18680        #[allow(unused_comparisons)]
18681        if __tmp.remaining() < Self::ENCODED_LEN {
18682            panic!(
18683                "buffer is too small (need {} bytes, but got {})",
18684                Self::ENCODED_LEN,
18685                __tmp.remaining(),
18686            )
18687        }
18688        __tmp.put_u8(self.target_system);
18689        __tmp.put_u8(self.target_component);
18690        if matches!(version, MavlinkVersion::V2) {
18691            let len = __tmp.len();
18692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18693        } else {
18694            __tmp.len()
18695        }
18696    }
18697}
18698#[doc = "Request a chunk of a log."]
18699#[doc = ""]
18700#[doc = "ID: 119"]
18701#[derive(Debug, Clone, PartialEq)]
18702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18704#[cfg_attr(feature = "ts", derive(TS))]
18705#[cfg_attr(feature = "ts", ts(export))]
18706pub struct LOG_REQUEST_DATA_DATA {
18707    #[doc = "Offset into the log"]
18708    pub ofs: u32,
18709    #[doc = "Number of bytes"]
18710    pub count: u32,
18711    #[doc = "Log id (from LOG_ENTRY reply)"]
18712    pub id: u16,
18713    #[doc = "System ID"]
18714    pub target_system: u8,
18715    #[doc = "Component ID"]
18716    pub target_component: u8,
18717}
18718impl LOG_REQUEST_DATA_DATA {
18719    pub const ENCODED_LEN: usize = 12usize;
18720    pub const DEFAULT: Self = Self {
18721        ofs: 0_u32,
18722        count: 0_u32,
18723        id: 0_u16,
18724        target_system: 0_u8,
18725        target_component: 0_u8,
18726    };
18727    #[cfg(feature = "arbitrary")]
18728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18729        use arbitrary::{Arbitrary, Unstructured};
18730        let mut buf = [0u8; 1024];
18731        rng.fill_bytes(&mut buf);
18732        let mut unstructured = Unstructured::new(&buf);
18733        Self::arbitrary(&mut unstructured).unwrap_or_default()
18734    }
18735}
18736impl Default for LOG_REQUEST_DATA_DATA {
18737    fn default() -> Self {
18738        Self::DEFAULT.clone()
18739    }
18740}
18741impl MessageData for LOG_REQUEST_DATA_DATA {
18742    type Message = MavMessage;
18743    const ID: u32 = 119u32;
18744    const NAME: &'static str = "LOG_REQUEST_DATA";
18745    const EXTRA_CRC: u8 = 116u8;
18746    const ENCODED_LEN: usize = 12usize;
18747    fn deser(
18748        _version: MavlinkVersion,
18749        __input: &[u8],
18750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18751        let avail_len = __input.len();
18752        let mut payload_buf = [0; Self::ENCODED_LEN];
18753        let mut buf = if avail_len < Self::ENCODED_LEN {
18754            payload_buf[0..avail_len].copy_from_slice(__input);
18755            Bytes::new(&payload_buf)
18756        } else {
18757            Bytes::new(__input)
18758        };
18759        let mut __struct = Self::default();
18760        __struct.ofs = buf.get_u32_le();
18761        __struct.count = buf.get_u32_le();
18762        __struct.id = buf.get_u16_le();
18763        __struct.target_system = buf.get_u8();
18764        __struct.target_component = buf.get_u8();
18765        Ok(__struct)
18766    }
18767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18768        let mut __tmp = BytesMut::new(bytes);
18769        #[allow(clippy::absurd_extreme_comparisons)]
18770        #[allow(unused_comparisons)]
18771        if __tmp.remaining() < Self::ENCODED_LEN {
18772            panic!(
18773                "buffer is too small (need {} bytes, but got {})",
18774                Self::ENCODED_LEN,
18775                __tmp.remaining(),
18776            )
18777        }
18778        __tmp.put_u32_le(self.ofs);
18779        __tmp.put_u32_le(self.count);
18780        __tmp.put_u16_le(self.id);
18781        __tmp.put_u8(self.target_system);
18782        __tmp.put_u8(self.target_component);
18783        if matches!(version, MavlinkVersion::V2) {
18784            let len = __tmp.len();
18785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18786        } else {
18787            __tmp.len()
18788        }
18789    }
18790}
18791#[doc = "Stop log transfer and resume normal logging."]
18792#[doc = ""]
18793#[doc = "ID: 122"]
18794#[derive(Debug, Clone, PartialEq)]
18795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18797#[cfg_attr(feature = "ts", derive(TS))]
18798#[cfg_attr(feature = "ts", ts(export))]
18799pub struct LOG_REQUEST_END_DATA {
18800    #[doc = "System ID"]
18801    pub target_system: u8,
18802    #[doc = "Component ID"]
18803    pub target_component: u8,
18804}
18805impl LOG_REQUEST_END_DATA {
18806    pub const ENCODED_LEN: usize = 2usize;
18807    pub const DEFAULT: Self = Self {
18808        target_system: 0_u8,
18809        target_component: 0_u8,
18810    };
18811    #[cfg(feature = "arbitrary")]
18812    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18813        use arbitrary::{Arbitrary, Unstructured};
18814        let mut buf = [0u8; 1024];
18815        rng.fill_bytes(&mut buf);
18816        let mut unstructured = Unstructured::new(&buf);
18817        Self::arbitrary(&mut unstructured).unwrap_or_default()
18818    }
18819}
18820impl Default for LOG_REQUEST_END_DATA {
18821    fn default() -> Self {
18822        Self::DEFAULT.clone()
18823    }
18824}
18825impl MessageData for LOG_REQUEST_END_DATA {
18826    type Message = MavMessage;
18827    const ID: u32 = 122u32;
18828    const NAME: &'static str = "LOG_REQUEST_END";
18829    const EXTRA_CRC: u8 = 203u8;
18830    const ENCODED_LEN: usize = 2usize;
18831    fn deser(
18832        _version: MavlinkVersion,
18833        __input: &[u8],
18834    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18835        let avail_len = __input.len();
18836        let mut payload_buf = [0; Self::ENCODED_LEN];
18837        let mut buf = if avail_len < Self::ENCODED_LEN {
18838            payload_buf[0..avail_len].copy_from_slice(__input);
18839            Bytes::new(&payload_buf)
18840        } else {
18841            Bytes::new(__input)
18842        };
18843        let mut __struct = Self::default();
18844        __struct.target_system = buf.get_u8();
18845        __struct.target_component = buf.get_u8();
18846        Ok(__struct)
18847    }
18848    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18849        let mut __tmp = BytesMut::new(bytes);
18850        #[allow(clippy::absurd_extreme_comparisons)]
18851        #[allow(unused_comparisons)]
18852        if __tmp.remaining() < Self::ENCODED_LEN {
18853            panic!(
18854                "buffer is too small (need {} bytes, but got {})",
18855                Self::ENCODED_LEN,
18856                __tmp.remaining(),
18857            )
18858        }
18859        __tmp.put_u8(self.target_system);
18860        __tmp.put_u8(self.target_component);
18861        if matches!(version, MavlinkVersion::V2) {
18862            let len = __tmp.len();
18863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18864        } else {
18865            __tmp.len()
18866        }
18867    }
18868}
18869#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18870#[doc = ""]
18871#[doc = "ID: 117"]
18872#[derive(Debug, Clone, PartialEq)]
18873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18875#[cfg_attr(feature = "ts", derive(TS))]
18876#[cfg_attr(feature = "ts", ts(export))]
18877pub struct LOG_REQUEST_LIST_DATA {
18878    #[doc = "First log id (0 for first available)"]
18879    pub start: u16,
18880    #[doc = "Last log id (0xffff for last available)"]
18881    pub end: u16,
18882    #[doc = "System ID"]
18883    pub target_system: u8,
18884    #[doc = "Component ID"]
18885    pub target_component: u8,
18886}
18887impl LOG_REQUEST_LIST_DATA {
18888    pub const ENCODED_LEN: usize = 6usize;
18889    pub const DEFAULT: Self = Self {
18890        start: 0_u16,
18891        end: 0_u16,
18892        target_system: 0_u8,
18893        target_component: 0_u8,
18894    };
18895    #[cfg(feature = "arbitrary")]
18896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18897        use arbitrary::{Arbitrary, Unstructured};
18898        let mut buf = [0u8; 1024];
18899        rng.fill_bytes(&mut buf);
18900        let mut unstructured = Unstructured::new(&buf);
18901        Self::arbitrary(&mut unstructured).unwrap_or_default()
18902    }
18903}
18904impl Default for LOG_REQUEST_LIST_DATA {
18905    fn default() -> Self {
18906        Self::DEFAULT.clone()
18907    }
18908}
18909impl MessageData for LOG_REQUEST_LIST_DATA {
18910    type Message = MavMessage;
18911    const ID: u32 = 117u32;
18912    const NAME: &'static str = "LOG_REQUEST_LIST";
18913    const EXTRA_CRC: u8 = 128u8;
18914    const ENCODED_LEN: usize = 6usize;
18915    fn deser(
18916        _version: MavlinkVersion,
18917        __input: &[u8],
18918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18919        let avail_len = __input.len();
18920        let mut payload_buf = [0; Self::ENCODED_LEN];
18921        let mut buf = if avail_len < Self::ENCODED_LEN {
18922            payload_buf[0..avail_len].copy_from_slice(__input);
18923            Bytes::new(&payload_buf)
18924        } else {
18925            Bytes::new(__input)
18926        };
18927        let mut __struct = Self::default();
18928        __struct.start = buf.get_u16_le();
18929        __struct.end = buf.get_u16_le();
18930        __struct.target_system = buf.get_u8();
18931        __struct.target_component = buf.get_u8();
18932        Ok(__struct)
18933    }
18934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18935        let mut __tmp = BytesMut::new(bytes);
18936        #[allow(clippy::absurd_extreme_comparisons)]
18937        #[allow(unused_comparisons)]
18938        if __tmp.remaining() < Self::ENCODED_LEN {
18939            panic!(
18940                "buffer is too small (need {} bytes, but got {})",
18941                Self::ENCODED_LEN,
18942                __tmp.remaining(),
18943            )
18944        }
18945        __tmp.put_u16_le(self.start);
18946        __tmp.put_u16_le(self.end);
18947        __tmp.put_u8(self.target_system);
18948        __tmp.put_u8(self.target_component);
18949        if matches!(version, MavlinkVersion::V2) {
18950            let len = __tmp.len();
18951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18952        } else {
18953            __tmp.len()
18954        }
18955    }
18956}
18957#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18958#[doc = ""]
18959#[doc = "ID: 192"]
18960#[derive(Debug, Clone, PartialEq)]
18961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18963#[cfg_attr(feature = "ts", derive(TS))]
18964#[cfg_attr(feature = "ts", ts(export))]
18965pub struct MAG_CAL_REPORT_DATA {
18966    #[doc = "RMS milligauss residuals."]
18967    pub fitness: f32,
18968    #[doc = "X offset."]
18969    pub ofs_x: f32,
18970    #[doc = "Y offset."]
18971    pub ofs_y: f32,
18972    #[doc = "Z offset."]
18973    pub ofs_z: f32,
18974    #[doc = "X diagonal (matrix 11)."]
18975    pub diag_x: f32,
18976    #[doc = "Y diagonal (matrix 22)."]
18977    pub diag_y: f32,
18978    #[doc = "Z diagonal (matrix 33)."]
18979    pub diag_z: f32,
18980    #[doc = "X off-diagonal (matrix 12 and 21)."]
18981    pub offdiag_x: f32,
18982    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18983    pub offdiag_y: f32,
18984    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18985    pub offdiag_z: f32,
18986    #[doc = "Compass being calibrated."]
18987    pub compass_id: u8,
18988    #[doc = "Bitmask of compasses being calibrated."]
18989    pub cal_mask: u8,
18990    #[doc = "Calibration Status."]
18991    pub cal_status: MagCalStatus,
18992    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18993    pub autosaved: u8,
18994    #[doc = "Confidence in orientation (higher is better)."]
18995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18996    pub orientation_confidence: f32,
18997    #[doc = "orientation before calibration."]
18998    #[cfg_attr(feature = "serde", serde(default))]
18999    pub old_orientation: MavSensorOrientation,
19000    #[doc = "orientation after calibration."]
19001    #[cfg_attr(feature = "serde", serde(default))]
19002    pub new_orientation: MavSensorOrientation,
19003    #[doc = "field radius correction factor"]
19004    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19005    pub scale_factor: f32,
19006}
19007impl MAG_CAL_REPORT_DATA {
19008    pub const ENCODED_LEN: usize = 54usize;
19009    pub const DEFAULT: Self = Self {
19010        fitness: 0.0_f32,
19011        ofs_x: 0.0_f32,
19012        ofs_y: 0.0_f32,
19013        ofs_z: 0.0_f32,
19014        diag_x: 0.0_f32,
19015        diag_y: 0.0_f32,
19016        diag_z: 0.0_f32,
19017        offdiag_x: 0.0_f32,
19018        offdiag_y: 0.0_f32,
19019        offdiag_z: 0.0_f32,
19020        compass_id: 0_u8,
19021        cal_mask: 0_u8,
19022        cal_status: MagCalStatus::DEFAULT,
19023        autosaved: 0_u8,
19024        orientation_confidence: 0.0_f32,
19025        old_orientation: MavSensorOrientation::DEFAULT,
19026        new_orientation: MavSensorOrientation::DEFAULT,
19027        scale_factor: 0.0_f32,
19028    };
19029    #[cfg(feature = "arbitrary")]
19030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19031        use arbitrary::{Arbitrary, Unstructured};
19032        let mut buf = [0u8; 1024];
19033        rng.fill_bytes(&mut buf);
19034        let mut unstructured = Unstructured::new(&buf);
19035        Self::arbitrary(&mut unstructured).unwrap_or_default()
19036    }
19037}
19038impl Default for MAG_CAL_REPORT_DATA {
19039    fn default() -> Self {
19040        Self::DEFAULT.clone()
19041    }
19042}
19043impl MessageData for MAG_CAL_REPORT_DATA {
19044    type Message = MavMessage;
19045    const ID: u32 = 192u32;
19046    const NAME: &'static str = "MAG_CAL_REPORT";
19047    const EXTRA_CRC: u8 = 36u8;
19048    const ENCODED_LEN: usize = 54usize;
19049    fn deser(
19050        _version: MavlinkVersion,
19051        __input: &[u8],
19052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19053        let avail_len = __input.len();
19054        let mut payload_buf = [0; Self::ENCODED_LEN];
19055        let mut buf = if avail_len < Self::ENCODED_LEN {
19056            payload_buf[0..avail_len].copy_from_slice(__input);
19057            Bytes::new(&payload_buf)
19058        } else {
19059            Bytes::new(__input)
19060        };
19061        let mut __struct = Self::default();
19062        __struct.fitness = buf.get_f32_le();
19063        __struct.ofs_x = buf.get_f32_le();
19064        __struct.ofs_y = buf.get_f32_le();
19065        __struct.ofs_z = buf.get_f32_le();
19066        __struct.diag_x = buf.get_f32_le();
19067        __struct.diag_y = buf.get_f32_le();
19068        __struct.diag_z = buf.get_f32_le();
19069        __struct.offdiag_x = buf.get_f32_le();
19070        __struct.offdiag_y = buf.get_f32_le();
19071        __struct.offdiag_z = buf.get_f32_le();
19072        __struct.compass_id = buf.get_u8();
19073        __struct.cal_mask = buf.get_u8();
19074        let tmp = buf.get_u8();
19075        __struct.cal_status =
19076            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19077                enum_type: "MagCalStatus",
19078                value: tmp as u64,
19079            })?;
19080        __struct.autosaved = buf.get_u8();
19081        __struct.orientation_confidence = buf.get_f32_le();
19082        let tmp = buf.get_u8();
19083        __struct.old_orientation =
19084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19085                enum_type: "MavSensorOrientation",
19086                value: tmp as u64,
19087            })?;
19088        let tmp = buf.get_u8();
19089        __struct.new_orientation =
19090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19091                enum_type: "MavSensorOrientation",
19092                value: tmp as u64,
19093            })?;
19094        __struct.scale_factor = buf.get_f32_le();
19095        Ok(__struct)
19096    }
19097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19098        let mut __tmp = BytesMut::new(bytes);
19099        #[allow(clippy::absurd_extreme_comparisons)]
19100        #[allow(unused_comparisons)]
19101        if __tmp.remaining() < Self::ENCODED_LEN {
19102            panic!(
19103                "buffer is too small (need {} bytes, but got {})",
19104                Self::ENCODED_LEN,
19105                __tmp.remaining(),
19106            )
19107        }
19108        __tmp.put_f32_le(self.fitness);
19109        __tmp.put_f32_le(self.ofs_x);
19110        __tmp.put_f32_le(self.ofs_y);
19111        __tmp.put_f32_le(self.ofs_z);
19112        __tmp.put_f32_le(self.diag_x);
19113        __tmp.put_f32_le(self.diag_y);
19114        __tmp.put_f32_le(self.diag_z);
19115        __tmp.put_f32_le(self.offdiag_x);
19116        __tmp.put_f32_le(self.offdiag_y);
19117        __tmp.put_f32_le(self.offdiag_z);
19118        __tmp.put_u8(self.compass_id);
19119        __tmp.put_u8(self.cal_mask);
19120        __tmp.put_u8(self.cal_status as u8);
19121        __tmp.put_u8(self.autosaved);
19122        if matches!(version, MavlinkVersion::V2) {
19123            __tmp.put_f32_le(self.orientation_confidence);
19124            __tmp.put_u8(self.old_orientation as u8);
19125            __tmp.put_u8(self.new_orientation as u8);
19126            __tmp.put_f32_le(self.scale_factor);
19127            let len = __tmp.len();
19128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19129        } else {
19130            __tmp.len()
19131        }
19132    }
19133}
19134#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19135#[doc = ""]
19136#[doc = "ID: 69"]
19137#[derive(Debug, Clone, PartialEq)]
19138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19140#[cfg_attr(feature = "ts", derive(TS))]
19141#[cfg_attr(feature = "ts", ts(export))]
19142pub struct MANUAL_CONTROL_DATA {
19143    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19144    pub x: i16,
19145    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19146    pub y: i16,
19147    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19148    pub z: i16,
19149    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19150    pub r: i16,
19151    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19152    pub buttons: u16,
19153    #[doc = "The system to be controlled."]
19154    pub target: u8,
19155    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19156    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19157    pub buttons2: u16,
19158    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19159    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19160    pub enabled_extensions: u8,
19161    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19162    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19163    pub s: i16,
19164    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19165    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19166    pub t: i16,
19167    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19169    pub aux1: i16,
19170    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19172    pub aux2: i16,
19173    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19175    pub aux3: i16,
19176    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19177    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19178    pub aux4: i16,
19179    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19180    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19181    pub aux5: i16,
19182    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19184    pub aux6: i16,
19185}
19186impl MANUAL_CONTROL_DATA {
19187    pub const ENCODED_LEN: usize = 30usize;
19188    pub const DEFAULT: Self = Self {
19189        x: 0_i16,
19190        y: 0_i16,
19191        z: 0_i16,
19192        r: 0_i16,
19193        buttons: 0_u16,
19194        target: 0_u8,
19195        buttons2: 0_u16,
19196        enabled_extensions: 0_u8,
19197        s: 0_i16,
19198        t: 0_i16,
19199        aux1: 0_i16,
19200        aux2: 0_i16,
19201        aux3: 0_i16,
19202        aux4: 0_i16,
19203        aux5: 0_i16,
19204        aux6: 0_i16,
19205    };
19206    #[cfg(feature = "arbitrary")]
19207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19208        use arbitrary::{Arbitrary, Unstructured};
19209        let mut buf = [0u8; 1024];
19210        rng.fill_bytes(&mut buf);
19211        let mut unstructured = Unstructured::new(&buf);
19212        Self::arbitrary(&mut unstructured).unwrap_or_default()
19213    }
19214}
19215impl Default for MANUAL_CONTROL_DATA {
19216    fn default() -> Self {
19217        Self::DEFAULT.clone()
19218    }
19219}
19220impl MessageData for MANUAL_CONTROL_DATA {
19221    type Message = MavMessage;
19222    const ID: u32 = 69u32;
19223    const NAME: &'static str = "MANUAL_CONTROL";
19224    const EXTRA_CRC: u8 = 243u8;
19225    const ENCODED_LEN: usize = 30usize;
19226    fn deser(
19227        _version: MavlinkVersion,
19228        __input: &[u8],
19229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19230        let avail_len = __input.len();
19231        let mut payload_buf = [0; Self::ENCODED_LEN];
19232        let mut buf = if avail_len < Self::ENCODED_LEN {
19233            payload_buf[0..avail_len].copy_from_slice(__input);
19234            Bytes::new(&payload_buf)
19235        } else {
19236            Bytes::new(__input)
19237        };
19238        let mut __struct = Self::default();
19239        __struct.x = buf.get_i16_le();
19240        __struct.y = buf.get_i16_le();
19241        __struct.z = buf.get_i16_le();
19242        __struct.r = buf.get_i16_le();
19243        __struct.buttons = buf.get_u16_le();
19244        __struct.target = buf.get_u8();
19245        __struct.buttons2 = buf.get_u16_le();
19246        __struct.enabled_extensions = buf.get_u8();
19247        __struct.s = buf.get_i16_le();
19248        __struct.t = buf.get_i16_le();
19249        __struct.aux1 = buf.get_i16_le();
19250        __struct.aux2 = buf.get_i16_le();
19251        __struct.aux3 = buf.get_i16_le();
19252        __struct.aux4 = buf.get_i16_le();
19253        __struct.aux5 = buf.get_i16_le();
19254        __struct.aux6 = buf.get_i16_le();
19255        Ok(__struct)
19256    }
19257    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19258        let mut __tmp = BytesMut::new(bytes);
19259        #[allow(clippy::absurd_extreme_comparisons)]
19260        #[allow(unused_comparisons)]
19261        if __tmp.remaining() < Self::ENCODED_LEN {
19262            panic!(
19263                "buffer is too small (need {} bytes, but got {})",
19264                Self::ENCODED_LEN,
19265                __tmp.remaining(),
19266            )
19267        }
19268        __tmp.put_i16_le(self.x);
19269        __tmp.put_i16_le(self.y);
19270        __tmp.put_i16_le(self.z);
19271        __tmp.put_i16_le(self.r);
19272        __tmp.put_u16_le(self.buttons);
19273        __tmp.put_u8(self.target);
19274        if matches!(version, MavlinkVersion::V2) {
19275            __tmp.put_u16_le(self.buttons2);
19276            __tmp.put_u8(self.enabled_extensions);
19277            __tmp.put_i16_le(self.s);
19278            __tmp.put_i16_le(self.t);
19279            __tmp.put_i16_le(self.aux1);
19280            __tmp.put_i16_le(self.aux2);
19281            __tmp.put_i16_le(self.aux3);
19282            __tmp.put_i16_le(self.aux4);
19283            __tmp.put_i16_le(self.aux5);
19284            __tmp.put_i16_le(self.aux6);
19285            let len = __tmp.len();
19286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19287        } else {
19288            __tmp.len()
19289        }
19290    }
19291}
19292#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19293#[doc = ""]
19294#[doc = "ID: 81"]
19295#[derive(Debug, Clone, PartialEq)]
19296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19298#[cfg_attr(feature = "ts", derive(TS))]
19299#[cfg_attr(feature = "ts", ts(export))]
19300pub struct MANUAL_SETPOINT_DATA {
19301    #[doc = "Timestamp (time since system boot)."]
19302    pub time_boot_ms: u32,
19303    #[doc = "Desired roll rate"]
19304    pub roll: f32,
19305    #[doc = "Desired pitch rate"]
19306    pub pitch: f32,
19307    #[doc = "Desired yaw rate"]
19308    pub yaw: f32,
19309    #[doc = "Collective thrust, normalized to 0 .. 1"]
19310    pub thrust: f32,
19311    #[doc = "Flight mode switch position, 0.. 255"]
19312    pub mode_switch: u8,
19313    #[doc = "Override mode switch position, 0.. 255"]
19314    pub manual_override_switch: u8,
19315}
19316impl MANUAL_SETPOINT_DATA {
19317    pub const ENCODED_LEN: usize = 22usize;
19318    pub const DEFAULT: Self = Self {
19319        time_boot_ms: 0_u32,
19320        roll: 0.0_f32,
19321        pitch: 0.0_f32,
19322        yaw: 0.0_f32,
19323        thrust: 0.0_f32,
19324        mode_switch: 0_u8,
19325        manual_override_switch: 0_u8,
19326    };
19327    #[cfg(feature = "arbitrary")]
19328    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19329        use arbitrary::{Arbitrary, Unstructured};
19330        let mut buf = [0u8; 1024];
19331        rng.fill_bytes(&mut buf);
19332        let mut unstructured = Unstructured::new(&buf);
19333        Self::arbitrary(&mut unstructured).unwrap_or_default()
19334    }
19335}
19336impl Default for MANUAL_SETPOINT_DATA {
19337    fn default() -> Self {
19338        Self::DEFAULT.clone()
19339    }
19340}
19341impl MessageData for MANUAL_SETPOINT_DATA {
19342    type Message = MavMessage;
19343    const ID: u32 = 81u32;
19344    const NAME: &'static str = "MANUAL_SETPOINT";
19345    const EXTRA_CRC: u8 = 106u8;
19346    const ENCODED_LEN: usize = 22usize;
19347    fn deser(
19348        _version: MavlinkVersion,
19349        __input: &[u8],
19350    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19351        let avail_len = __input.len();
19352        let mut payload_buf = [0; Self::ENCODED_LEN];
19353        let mut buf = if avail_len < Self::ENCODED_LEN {
19354            payload_buf[0..avail_len].copy_from_slice(__input);
19355            Bytes::new(&payload_buf)
19356        } else {
19357            Bytes::new(__input)
19358        };
19359        let mut __struct = Self::default();
19360        __struct.time_boot_ms = buf.get_u32_le();
19361        __struct.roll = buf.get_f32_le();
19362        __struct.pitch = buf.get_f32_le();
19363        __struct.yaw = buf.get_f32_le();
19364        __struct.thrust = buf.get_f32_le();
19365        __struct.mode_switch = buf.get_u8();
19366        __struct.manual_override_switch = buf.get_u8();
19367        Ok(__struct)
19368    }
19369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19370        let mut __tmp = BytesMut::new(bytes);
19371        #[allow(clippy::absurd_extreme_comparisons)]
19372        #[allow(unused_comparisons)]
19373        if __tmp.remaining() < Self::ENCODED_LEN {
19374            panic!(
19375                "buffer is too small (need {} bytes, but got {})",
19376                Self::ENCODED_LEN,
19377                __tmp.remaining(),
19378            )
19379        }
19380        __tmp.put_u32_le(self.time_boot_ms);
19381        __tmp.put_f32_le(self.roll);
19382        __tmp.put_f32_le(self.pitch);
19383        __tmp.put_f32_le(self.yaw);
19384        __tmp.put_f32_le(self.thrust);
19385        __tmp.put_u8(self.mode_switch);
19386        __tmp.put_u8(self.manual_override_switch);
19387        if matches!(version, MavlinkVersion::V2) {
19388            let len = __tmp.len();
19389            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19390        } else {
19391            __tmp.len()
19392        }
19393    }
19394}
19395#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19396#[doc = ""]
19397#[doc = "ID: 249"]
19398#[derive(Debug, Clone, PartialEq)]
19399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19401#[cfg_attr(feature = "ts", derive(TS))]
19402#[cfg_attr(feature = "ts", ts(export))]
19403pub struct MEMORY_VECT_DATA {
19404    #[doc = "Starting address of the debug variables"]
19405    pub address: u16,
19406    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19407    pub ver: u8,
19408    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19409    pub mavtype: u8,
19410    #[doc = "Memory contents at specified address"]
19411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19412    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19413    pub value: [i8; 32],
19414}
19415impl MEMORY_VECT_DATA {
19416    pub const ENCODED_LEN: usize = 36usize;
19417    pub const DEFAULT: Self = Self {
19418        address: 0_u16,
19419        ver: 0_u8,
19420        mavtype: 0_u8,
19421        value: [0_i8; 32usize],
19422    };
19423    #[cfg(feature = "arbitrary")]
19424    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19425        use arbitrary::{Arbitrary, Unstructured};
19426        let mut buf = [0u8; 1024];
19427        rng.fill_bytes(&mut buf);
19428        let mut unstructured = Unstructured::new(&buf);
19429        Self::arbitrary(&mut unstructured).unwrap_or_default()
19430    }
19431}
19432impl Default for MEMORY_VECT_DATA {
19433    fn default() -> Self {
19434        Self::DEFAULT.clone()
19435    }
19436}
19437impl MessageData for MEMORY_VECT_DATA {
19438    type Message = MavMessage;
19439    const ID: u32 = 249u32;
19440    const NAME: &'static str = "MEMORY_VECT";
19441    const EXTRA_CRC: u8 = 204u8;
19442    const ENCODED_LEN: usize = 36usize;
19443    fn deser(
19444        _version: MavlinkVersion,
19445        __input: &[u8],
19446    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19447        let avail_len = __input.len();
19448        let mut payload_buf = [0; Self::ENCODED_LEN];
19449        let mut buf = if avail_len < Self::ENCODED_LEN {
19450            payload_buf[0..avail_len].copy_from_slice(__input);
19451            Bytes::new(&payload_buf)
19452        } else {
19453            Bytes::new(__input)
19454        };
19455        let mut __struct = Self::default();
19456        __struct.address = buf.get_u16_le();
19457        __struct.ver = buf.get_u8();
19458        __struct.mavtype = buf.get_u8();
19459        for v in &mut __struct.value {
19460            let val = buf.get_i8();
19461            *v = val;
19462        }
19463        Ok(__struct)
19464    }
19465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19466        let mut __tmp = BytesMut::new(bytes);
19467        #[allow(clippy::absurd_extreme_comparisons)]
19468        #[allow(unused_comparisons)]
19469        if __tmp.remaining() < Self::ENCODED_LEN {
19470            panic!(
19471                "buffer is too small (need {} bytes, but got {})",
19472                Self::ENCODED_LEN,
19473                __tmp.remaining(),
19474            )
19475        }
19476        __tmp.put_u16_le(self.address);
19477        __tmp.put_u8(self.ver);
19478        __tmp.put_u8(self.mavtype);
19479        for val in &self.value {
19480            __tmp.put_i8(*val);
19481        }
19482        if matches!(version, MavlinkVersion::V2) {
19483            let len = __tmp.len();
19484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19485        } else {
19486            __tmp.len()
19487        }
19488    }
19489}
19490#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19491#[doc = ""]
19492#[doc = "ID: 244"]
19493#[derive(Debug, Clone, PartialEq)]
19494#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19495#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19496#[cfg_attr(feature = "ts", derive(TS))]
19497#[cfg_attr(feature = "ts", ts(export))]
19498pub struct MESSAGE_INTERVAL_DATA {
19499    #[doc = "0 indicates the interval at which it is sent."]
19500    pub interval_us: i32,
19501    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19502    pub message_id: u16,
19503}
19504impl MESSAGE_INTERVAL_DATA {
19505    pub const ENCODED_LEN: usize = 6usize;
19506    pub const DEFAULT: Self = Self {
19507        interval_us: 0_i32,
19508        message_id: 0_u16,
19509    };
19510    #[cfg(feature = "arbitrary")]
19511    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19512        use arbitrary::{Arbitrary, Unstructured};
19513        let mut buf = [0u8; 1024];
19514        rng.fill_bytes(&mut buf);
19515        let mut unstructured = Unstructured::new(&buf);
19516        Self::arbitrary(&mut unstructured).unwrap_or_default()
19517    }
19518}
19519impl Default for MESSAGE_INTERVAL_DATA {
19520    fn default() -> Self {
19521        Self::DEFAULT.clone()
19522    }
19523}
19524impl MessageData for MESSAGE_INTERVAL_DATA {
19525    type Message = MavMessage;
19526    const ID: u32 = 244u32;
19527    const NAME: &'static str = "MESSAGE_INTERVAL";
19528    const EXTRA_CRC: u8 = 95u8;
19529    const ENCODED_LEN: usize = 6usize;
19530    fn deser(
19531        _version: MavlinkVersion,
19532        __input: &[u8],
19533    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19534        let avail_len = __input.len();
19535        let mut payload_buf = [0; Self::ENCODED_LEN];
19536        let mut buf = if avail_len < Self::ENCODED_LEN {
19537            payload_buf[0..avail_len].copy_from_slice(__input);
19538            Bytes::new(&payload_buf)
19539        } else {
19540            Bytes::new(__input)
19541        };
19542        let mut __struct = Self::default();
19543        __struct.interval_us = buf.get_i32_le();
19544        __struct.message_id = buf.get_u16_le();
19545        Ok(__struct)
19546    }
19547    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19548        let mut __tmp = BytesMut::new(bytes);
19549        #[allow(clippy::absurd_extreme_comparisons)]
19550        #[allow(unused_comparisons)]
19551        if __tmp.remaining() < Self::ENCODED_LEN {
19552            panic!(
19553                "buffer is too small (need {} bytes, but got {})",
19554                Self::ENCODED_LEN,
19555                __tmp.remaining(),
19556            )
19557        }
19558        __tmp.put_i32_le(self.interval_us);
19559        __tmp.put_u16_le(self.message_id);
19560        if matches!(version, MavlinkVersion::V2) {
19561            let len = __tmp.len();
19562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19563        } else {
19564            __tmp.len()
19565        }
19566    }
19567}
19568#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19569#[doc = ""]
19570#[doc = "ID: 47"]
19571#[derive(Debug, Clone, PartialEq)]
19572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19574#[cfg_attr(feature = "ts", derive(TS))]
19575#[cfg_attr(feature = "ts", ts(export))]
19576pub struct MISSION_ACK_DATA {
19577    #[doc = "System ID"]
19578    pub target_system: u8,
19579    #[doc = "Component ID"]
19580    pub target_component: u8,
19581    #[doc = "Mission result."]
19582    pub mavtype: MavMissionResult,
19583    #[doc = "Mission type."]
19584    #[cfg_attr(feature = "serde", serde(default))]
19585    pub mission_type: MavMissionType,
19586    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19588    pub opaque_id: u32,
19589}
19590impl MISSION_ACK_DATA {
19591    pub const ENCODED_LEN: usize = 8usize;
19592    pub const DEFAULT: Self = Self {
19593        target_system: 0_u8,
19594        target_component: 0_u8,
19595        mavtype: MavMissionResult::DEFAULT,
19596        mission_type: MavMissionType::DEFAULT,
19597        opaque_id: 0_u32,
19598    };
19599    #[cfg(feature = "arbitrary")]
19600    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19601        use arbitrary::{Arbitrary, Unstructured};
19602        let mut buf = [0u8; 1024];
19603        rng.fill_bytes(&mut buf);
19604        let mut unstructured = Unstructured::new(&buf);
19605        Self::arbitrary(&mut unstructured).unwrap_or_default()
19606    }
19607}
19608impl Default for MISSION_ACK_DATA {
19609    fn default() -> Self {
19610        Self::DEFAULT.clone()
19611    }
19612}
19613impl MessageData for MISSION_ACK_DATA {
19614    type Message = MavMessage;
19615    const ID: u32 = 47u32;
19616    const NAME: &'static str = "MISSION_ACK";
19617    const EXTRA_CRC: u8 = 153u8;
19618    const ENCODED_LEN: usize = 8usize;
19619    fn deser(
19620        _version: MavlinkVersion,
19621        __input: &[u8],
19622    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19623        let avail_len = __input.len();
19624        let mut payload_buf = [0; Self::ENCODED_LEN];
19625        let mut buf = if avail_len < Self::ENCODED_LEN {
19626            payload_buf[0..avail_len].copy_from_slice(__input);
19627            Bytes::new(&payload_buf)
19628        } else {
19629            Bytes::new(__input)
19630        };
19631        let mut __struct = Self::default();
19632        __struct.target_system = buf.get_u8();
19633        __struct.target_component = buf.get_u8();
19634        let tmp = buf.get_u8();
19635        __struct.mavtype =
19636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19637                enum_type: "MavMissionResult",
19638                value: tmp as u64,
19639            })?;
19640        let tmp = buf.get_u8();
19641        __struct.mission_type =
19642            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19643                enum_type: "MavMissionType",
19644                value: tmp as u64,
19645            })?;
19646        __struct.opaque_id = buf.get_u32_le();
19647        Ok(__struct)
19648    }
19649    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19650        let mut __tmp = BytesMut::new(bytes);
19651        #[allow(clippy::absurd_extreme_comparisons)]
19652        #[allow(unused_comparisons)]
19653        if __tmp.remaining() < Self::ENCODED_LEN {
19654            panic!(
19655                "buffer is too small (need {} bytes, but got {})",
19656                Self::ENCODED_LEN,
19657                __tmp.remaining(),
19658            )
19659        }
19660        __tmp.put_u8(self.target_system);
19661        __tmp.put_u8(self.target_component);
19662        __tmp.put_u8(self.mavtype as u8);
19663        if matches!(version, MavlinkVersion::V2) {
19664            __tmp.put_u8(self.mission_type as u8);
19665            __tmp.put_u32_le(self.opaque_id);
19666            let len = __tmp.len();
19667            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19668        } else {
19669            __tmp.len()
19670        }
19671    }
19672}
19673#[doc = "Delete all mission items at once."]
19674#[doc = ""]
19675#[doc = "ID: 45"]
19676#[derive(Debug, Clone, PartialEq)]
19677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19678#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19679#[cfg_attr(feature = "ts", derive(TS))]
19680#[cfg_attr(feature = "ts", ts(export))]
19681pub struct MISSION_CLEAR_ALL_DATA {
19682    #[doc = "System ID"]
19683    pub target_system: u8,
19684    #[doc = "Component ID"]
19685    pub target_component: u8,
19686    #[doc = "Mission type."]
19687    #[cfg_attr(feature = "serde", serde(default))]
19688    pub mission_type: MavMissionType,
19689}
19690impl MISSION_CLEAR_ALL_DATA {
19691    pub const ENCODED_LEN: usize = 3usize;
19692    pub const DEFAULT: Self = Self {
19693        target_system: 0_u8,
19694        target_component: 0_u8,
19695        mission_type: MavMissionType::DEFAULT,
19696    };
19697    #[cfg(feature = "arbitrary")]
19698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19699        use arbitrary::{Arbitrary, Unstructured};
19700        let mut buf = [0u8; 1024];
19701        rng.fill_bytes(&mut buf);
19702        let mut unstructured = Unstructured::new(&buf);
19703        Self::arbitrary(&mut unstructured).unwrap_or_default()
19704    }
19705}
19706impl Default for MISSION_CLEAR_ALL_DATA {
19707    fn default() -> Self {
19708        Self::DEFAULT.clone()
19709    }
19710}
19711impl MessageData for MISSION_CLEAR_ALL_DATA {
19712    type Message = MavMessage;
19713    const ID: u32 = 45u32;
19714    const NAME: &'static str = "MISSION_CLEAR_ALL";
19715    const EXTRA_CRC: u8 = 232u8;
19716    const ENCODED_LEN: usize = 3usize;
19717    fn deser(
19718        _version: MavlinkVersion,
19719        __input: &[u8],
19720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19721        let avail_len = __input.len();
19722        let mut payload_buf = [0; Self::ENCODED_LEN];
19723        let mut buf = if avail_len < Self::ENCODED_LEN {
19724            payload_buf[0..avail_len].copy_from_slice(__input);
19725            Bytes::new(&payload_buf)
19726        } else {
19727            Bytes::new(__input)
19728        };
19729        let mut __struct = Self::default();
19730        __struct.target_system = buf.get_u8();
19731        __struct.target_component = buf.get_u8();
19732        let tmp = buf.get_u8();
19733        __struct.mission_type =
19734            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19735                enum_type: "MavMissionType",
19736                value: tmp as u64,
19737            })?;
19738        Ok(__struct)
19739    }
19740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19741        let mut __tmp = BytesMut::new(bytes);
19742        #[allow(clippy::absurd_extreme_comparisons)]
19743        #[allow(unused_comparisons)]
19744        if __tmp.remaining() < Self::ENCODED_LEN {
19745            panic!(
19746                "buffer is too small (need {} bytes, but got {})",
19747                Self::ENCODED_LEN,
19748                __tmp.remaining(),
19749            )
19750        }
19751        __tmp.put_u8(self.target_system);
19752        __tmp.put_u8(self.target_component);
19753        if matches!(version, MavlinkVersion::V2) {
19754            __tmp.put_u8(self.mission_type as u8);
19755            let len = __tmp.len();
19756            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19757        } else {
19758            __tmp.len()
19759        }
19760    }
19761}
19762#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19763#[doc = ""]
19764#[doc = "ID: 44"]
19765#[derive(Debug, Clone, PartialEq)]
19766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19768#[cfg_attr(feature = "ts", derive(TS))]
19769#[cfg_attr(feature = "ts", ts(export))]
19770pub struct MISSION_COUNT_DATA {
19771    #[doc = "Number of mission items in the sequence"]
19772    pub count: u16,
19773    #[doc = "System ID"]
19774    pub target_system: u8,
19775    #[doc = "Component ID"]
19776    pub target_component: u8,
19777    #[doc = "Mission type."]
19778    #[cfg_attr(feature = "serde", serde(default))]
19779    pub mission_type: MavMissionType,
19780    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19782    pub opaque_id: u32,
19783}
19784impl MISSION_COUNT_DATA {
19785    pub const ENCODED_LEN: usize = 9usize;
19786    pub const DEFAULT: Self = Self {
19787        count: 0_u16,
19788        target_system: 0_u8,
19789        target_component: 0_u8,
19790        mission_type: MavMissionType::DEFAULT,
19791        opaque_id: 0_u32,
19792    };
19793    #[cfg(feature = "arbitrary")]
19794    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19795        use arbitrary::{Arbitrary, Unstructured};
19796        let mut buf = [0u8; 1024];
19797        rng.fill_bytes(&mut buf);
19798        let mut unstructured = Unstructured::new(&buf);
19799        Self::arbitrary(&mut unstructured).unwrap_or_default()
19800    }
19801}
19802impl Default for MISSION_COUNT_DATA {
19803    fn default() -> Self {
19804        Self::DEFAULT.clone()
19805    }
19806}
19807impl MessageData for MISSION_COUNT_DATA {
19808    type Message = MavMessage;
19809    const ID: u32 = 44u32;
19810    const NAME: &'static str = "MISSION_COUNT";
19811    const EXTRA_CRC: u8 = 221u8;
19812    const ENCODED_LEN: usize = 9usize;
19813    fn deser(
19814        _version: MavlinkVersion,
19815        __input: &[u8],
19816    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19817        let avail_len = __input.len();
19818        let mut payload_buf = [0; Self::ENCODED_LEN];
19819        let mut buf = if avail_len < Self::ENCODED_LEN {
19820            payload_buf[0..avail_len].copy_from_slice(__input);
19821            Bytes::new(&payload_buf)
19822        } else {
19823            Bytes::new(__input)
19824        };
19825        let mut __struct = Self::default();
19826        __struct.count = buf.get_u16_le();
19827        __struct.target_system = buf.get_u8();
19828        __struct.target_component = buf.get_u8();
19829        let tmp = buf.get_u8();
19830        __struct.mission_type =
19831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19832                enum_type: "MavMissionType",
19833                value: tmp as u64,
19834            })?;
19835        __struct.opaque_id = buf.get_u32_le();
19836        Ok(__struct)
19837    }
19838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19839        let mut __tmp = BytesMut::new(bytes);
19840        #[allow(clippy::absurd_extreme_comparisons)]
19841        #[allow(unused_comparisons)]
19842        if __tmp.remaining() < Self::ENCODED_LEN {
19843            panic!(
19844                "buffer is too small (need {} bytes, but got {})",
19845                Self::ENCODED_LEN,
19846                __tmp.remaining(),
19847            )
19848        }
19849        __tmp.put_u16_le(self.count);
19850        __tmp.put_u8(self.target_system);
19851        __tmp.put_u8(self.target_component);
19852        if matches!(version, MavlinkVersion::V2) {
19853            __tmp.put_u8(self.mission_type as u8);
19854            __tmp.put_u32_le(self.opaque_id);
19855            let len = __tmp.len();
19856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19857        } else {
19858            __tmp.len()
19859        }
19860    }
19861}
19862#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19863#[doc = ""]
19864#[doc = "ID: 42"]
19865#[derive(Debug, Clone, PartialEq)]
19866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19867#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19868#[cfg_attr(feature = "ts", derive(TS))]
19869#[cfg_attr(feature = "ts", ts(export))]
19870pub struct MISSION_CURRENT_DATA {
19871    #[doc = "Sequence"]
19872    pub seq: u16,
19873    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19874    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19875    pub total: u16,
19876    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19877    #[cfg_attr(feature = "serde", serde(default))]
19878    pub mission_state: MissionState,
19879    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19880    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19881    pub mission_mode: u8,
19882    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19883    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19884    pub mission_id: u32,
19885    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19887    pub fence_id: u32,
19888    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19889    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19890    pub rally_points_id: u32,
19891}
19892impl MISSION_CURRENT_DATA {
19893    pub const ENCODED_LEN: usize = 18usize;
19894    pub const DEFAULT: Self = Self {
19895        seq: 0_u16,
19896        total: 0_u16,
19897        mission_state: MissionState::DEFAULT,
19898        mission_mode: 0_u8,
19899        mission_id: 0_u32,
19900        fence_id: 0_u32,
19901        rally_points_id: 0_u32,
19902    };
19903    #[cfg(feature = "arbitrary")]
19904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19905        use arbitrary::{Arbitrary, Unstructured};
19906        let mut buf = [0u8; 1024];
19907        rng.fill_bytes(&mut buf);
19908        let mut unstructured = Unstructured::new(&buf);
19909        Self::arbitrary(&mut unstructured).unwrap_or_default()
19910    }
19911}
19912impl Default for MISSION_CURRENT_DATA {
19913    fn default() -> Self {
19914        Self::DEFAULT.clone()
19915    }
19916}
19917impl MessageData for MISSION_CURRENT_DATA {
19918    type Message = MavMessage;
19919    const ID: u32 = 42u32;
19920    const NAME: &'static str = "MISSION_CURRENT";
19921    const EXTRA_CRC: u8 = 28u8;
19922    const ENCODED_LEN: usize = 18usize;
19923    fn deser(
19924        _version: MavlinkVersion,
19925        __input: &[u8],
19926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19927        let avail_len = __input.len();
19928        let mut payload_buf = [0; Self::ENCODED_LEN];
19929        let mut buf = if avail_len < Self::ENCODED_LEN {
19930            payload_buf[0..avail_len].copy_from_slice(__input);
19931            Bytes::new(&payload_buf)
19932        } else {
19933            Bytes::new(__input)
19934        };
19935        let mut __struct = Self::default();
19936        __struct.seq = buf.get_u16_le();
19937        __struct.total = buf.get_u16_le();
19938        let tmp = buf.get_u8();
19939        __struct.mission_state =
19940            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19941                enum_type: "MissionState",
19942                value: tmp as u64,
19943            })?;
19944        __struct.mission_mode = buf.get_u8();
19945        __struct.mission_id = buf.get_u32_le();
19946        __struct.fence_id = buf.get_u32_le();
19947        __struct.rally_points_id = buf.get_u32_le();
19948        Ok(__struct)
19949    }
19950    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19951        let mut __tmp = BytesMut::new(bytes);
19952        #[allow(clippy::absurd_extreme_comparisons)]
19953        #[allow(unused_comparisons)]
19954        if __tmp.remaining() < Self::ENCODED_LEN {
19955            panic!(
19956                "buffer is too small (need {} bytes, but got {})",
19957                Self::ENCODED_LEN,
19958                __tmp.remaining(),
19959            )
19960        }
19961        __tmp.put_u16_le(self.seq);
19962        if matches!(version, MavlinkVersion::V2) {
19963            __tmp.put_u16_le(self.total);
19964            __tmp.put_u8(self.mission_state as u8);
19965            __tmp.put_u8(self.mission_mode);
19966            __tmp.put_u32_le(self.mission_id);
19967            __tmp.put_u32_le(self.fence_id);
19968            __tmp.put_u32_le(self.rally_points_id);
19969            let len = __tmp.len();
19970            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19971        } else {
19972            __tmp.len()
19973        }
19974    }
19975}
19976#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19977#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19978#[doc = ""]
19979#[doc = "ID: 39"]
19980#[derive(Debug, Clone, PartialEq)]
19981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19983#[cfg_attr(feature = "ts", derive(TS))]
19984#[cfg_attr(feature = "ts", ts(export))]
19985pub struct MISSION_ITEM_DATA {
19986    #[doc = "PARAM1, see MAV_CMD enum"]
19987    pub param1: f32,
19988    #[doc = "PARAM2, see MAV_CMD enum"]
19989    pub param2: f32,
19990    #[doc = "PARAM3, see MAV_CMD enum"]
19991    pub param3: f32,
19992    #[doc = "PARAM4, see MAV_CMD enum"]
19993    pub param4: f32,
19994    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19995    pub x: f32,
19996    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19997    pub y: f32,
19998    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19999    pub z: f32,
20000    #[doc = "Sequence"]
20001    pub seq: u16,
20002    #[doc = "The scheduled action for the waypoint."]
20003    pub command: MavCmd,
20004    #[doc = "System ID"]
20005    pub target_system: u8,
20006    #[doc = "Component ID"]
20007    pub target_component: u8,
20008    #[doc = "The coordinate system of the waypoint."]
20009    pub frame: MavFrame,
20010    #[doc = "false:0, true:1"]
20011    pub current: u8,
20012    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20013    pub autocontinue: u8,
20014    #[doc = "Mission type."]
20015    #[cfg_attr(feature = "serde", serde(default))]
20016    pub mission_type: MavMissionType,
20017}
20018impl MISSION_ITEM_DATA {
20019    pub const ENCODED_LEN: usize = 38usize;
20020    pub const DEFAULT: Self = Self {
20021        param1: 0.0_f32,
20022        param2: 0.0_f32,
20023        param3: 0.0_f32,
20024        param4: 0.0_f32,
20025        x: 0.0_f32,
20026        y: 0.0_f32,
20027        z: 0.0_f32,
20028        seq: 0_u16,
20029        command: MavCmd::DEFAULT,
20030        target_system: 0_u8,
20031        target_component: 0_u8,
20032        frame: MavFrame::DEFAULT,
20033        current: 0_u8,
20034        autocontinue: 0_u8,
20035        mission_type: MavMissionType::DEFAULT,
20036    };
20037    #[cfg(feature = "arbitrary")]
20038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20039        use arbitrary::{Arbitrary, Unstructured};
20040        let mut buf = [0u8; 1024];
20041        rng.fill_bytes(&mut buf);
20042        let mut unstructured = Unstructured::new(&buf);
20043        Self::arbitrary(&mut unstructured).unwrap_or_default()
20044    }
20045}
20046impl Default for MISSION_ITEM_DATA {
20047    fn default() -> Self {
20048        Self::DEFAULT.clone()
20049    }
20050}
20051impl MessageData for MISSION_ITEM_DATA {
20052    type Message = MavMessage;
20053    const ID: u32 = 39u32;
20054    const NAME: &'static str = "MISSION_ITEM";
20055    const EXTRA_CRC: u8 = 254u8;
20056    const ENCODED_LEN: usize = 38usize;
20057    fn deser(
20058        _version: MavlinkVersion,
20059        __input: &[u8],
20060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20061        let avail_len = __input.len();
20062        let mut payload_buf = [0; Self::ENCODED_LEN];
20063        let mut buf = if avail_len < Self::ENCODED_LEN {
20064            payload_buf[0..avail_len].copy_from_slice(__input);
20065            Bytes::new(&payload_buf)
20066        } else {
20067            Bytes::new(__input)
20068        };
20069        let mut __struct = Self::default();
20070        __struct.param1 = buf.get_f32_le();
20071        __struct.param2 = buf.get_f32_le();
20072        __struct.param3 = buf.get_f32_le();
20073        __struct.param4 = buf.get_f32_le();
20074        __struct.x = buf.get_f32_le();
20075        __struct.y = buf.get_f32_le();
20076        __struct.z = buf.get_f32_le();
20077        __struct.seq = buf.get_u16_le();
20078        let tmp = buf.get_u16_le();
20079        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20080            ::mavlink_core::error::ParserError::InvalidEnum {
20081                enum_type: "MavCmd",
20082                value: tmp as u64,
20083            },
20084        )?;
20085        __struct.target_system = buf.get_u8();
20086        __struct.target_component = buf.get_u8();
20087        let tmp = buf.get_u8();
20088        __struct.frame =
20089            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20090                enum_type: "MavFrame",
20091                value: tmp as u64,
20092            })?;
20093        __struct.current = buf.get_u8();
20094        __struct.autocontinue = buf.get_u8();
20095        let tmp = buf.get_u8();
20096        __struct.mission_type =
20097            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20098                enum_type: "MavMissionType",
20099                value: tmp as u64,
20100            })?;
20101        Ok(__struct)
20102    }
20103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20104        let mut __tmp = BytesMut::new(bytes);
20105        #[allow(clippy::absurd_extreme_comparisons)]
20106        #[allow(unused_comparisons)]
20107        if __tmp.remaining() < Self::ENCODED_LEN {
20108            panic!(
20109                "buffer is too small (need {} bytes, but got {})",
20110                Self::ENCODED_LEN,
20111                __tmp.remaining(),
20112            )
20113        }
20114        __tmp.put_f32_le(self.param1);
20115        __tmp.put_f32_le(self.param2);
20116        __tmp.put_f32_le(self.param3);
20117        __tmp.put_f32_le(self.param4);
20118        __tmp.put_f32_le(self.x);
20119        __tmp.put_f32_le(self.y);
20120        __tmp.put_f32_le(self.z);
20121        __tmp.put_u16_le(self.seq);
20122        __tmp.put_u16_le(self.command as u16);
20123        __tmp.put_u8(self.target_system);
20124        __tmp.put_u8(self.target_component);
20125        __tmp.put_u8(self.frame as u8);
20126        __tmp.put_u8(self.current);
20127        __tmp.put_u8(self.autocontinue);
20128        if matches!(version, MavlinkVersion::V2) {
20129            __tmp.put_u8(self.mission_type as u8);
20130            let len = __tmp.len();
20131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20132        } else {
20133            __tmp.len()
20134        }
20135    }
20136}
20137#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20138#[doc = ""]
20139#[doc = "ID: 73"]
20140#[derive(Debug, Clone, PartialEq)]
20141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20142#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20143#[cfg_attr(feature = "ts", derive(TS))]
20144#[cfg_attr(feature = "ts", ts(export))]
20145pub struct MISSION_ITEM_INT_DATA {
20146    #[doc = "PARAM1, see MAV_CMD enum"]
20147    pub param1: f32,
20148    #[doc = "PARAM2, see MAV_CMD enum"]
20149    pub param2: f32,
20150    #[doc = "PARAM3, see MAV_CMD enum"]
20151    pub param3: f32,
20152    #[doc = "PARAM4, see MAV_CMD enum"]
20153    pub param4: f32,
20154    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20155    pub x: i32,
20156    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20157    pub y: i32,
20158    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20159    pub z: f32,
20160    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20161    pub seq: u16,
20162    #[doc = "The scheduled action for the waypoint."]
20163    pub command: MavCmd,
20164    #[doc = "System ID"]
20165    pub target_system: u8,
20166    #[doc = "Component ID"]
20167    pub target_component: u8,
20168    #[doc = "The coordinate system of the waypoint."]
20169    pub frame: MavFrame,
20170    #[doc = "false:0, true:1"]
20171    pub current: u8,
20172    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20173    pub autocontinue: u8,
20174    #[doc = "Mission type."]
20175    #[cfg_attr(feature = "serde", serde(default))]
20176    pub mission_type: MavMissionType,
20177}
20178impl MISSION_ITEM_INT_DATA {
20179    pub const ENCODED_LEN: usize = 38usize;
20180    pub const DEFAULT: Self = Self {
20181        param1: 0.0_f32,
20182        param2: 0.0_f32,
20183        param3: 0.0_f32,
20184        param4: 0.0_f32,
20185        x: 0_i32,
20186        y: 0_i32,
20187        z: 0.0_f32,
20188        seq: 0_u16,
20189        command: MavCmd::DEFAULT,
20190        target_system: 0_u8,
20191        target_component: 0_u8,
20192        frame: MavFrame::DEFAULT,
20193        current: 0_u8,
20194        autocontinue: 0_u8,
20195        mission_type: MavMissionType::DEFAULT,
20196    };
20197    #[cfg(feature = "arbitrary")]
20198    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20199        use arbitrary::{Arbitrary, Unstructured};
20200        let mut buf = [0u8; 1024];
20201        rng.fill_bytes(&mut buf);
20202        let mut unstructured = Unstructured::new(&buf);
20203        Self::arbitrary(&mut unstructured).unwrap_or_default()
20204    }
20205}
20206impl Default for MISSION_ITEM_INT_DATA {
20207    fn default() -> Self {
20208        Self::DEFAULT.clone()
20209    }
20210}
20211impl MessageData for MISSION_ITEM_INT_DATA {
20212    type Message = MavMessage;
20213    const ID: u32 = 73u32;
20214    const NAME: &'static str = "MISSION_ITEM_INT";
20215    const EXTRA_CRC: u8 = 38u8;
20216    const ENCODED_LEN: usize = 38usize;
20217    fn deser(
20218        _version: MavlinkVersion,
20219        __input: &[u8],
20220    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20221        let avail_len = __input.len();
20222        let mut payload_buf = [0; Self::ENCODED_LEN];
20223        let mut buf = if avail_len < Self::ENCODED_LEN {
20224            payload_buf[0..avail_len].copy_from_slice(__input);
20225            Bytes::new(&payload_buf)
20226        } else {
20227            Bytes::new(__input)
20228        };
20229        let mut __struct = Self::default();
20230        __struct.param1 = buf.get_f32_le();
20231        __struct.param2 = buf.get_f32_le();
20232        __struct.param3 = buf.get_f32_le();
20233        __struct.param4 = buf.get_f32_le();
20234        __struct.x = buf.get_i32_le();
20235        __struct.y = buf.get_i32_le();
20236        __struct.z = buf.get_f32_le();
20237        __struct.seq = buf.get_u16_le();
20238        let tmp = buf.get_u16_le();
20239        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20240            ::mavlink_core::error::ParserError::InvalidEnum {
20241                enum_type: "MavCmd",
20242                value: tmp as u64,
20243            },
20244        )?;
20245        __struct.target_system = buf.get_u8();
20246        __struct.target_component = buf.get_u8();
20247        let tmp = buf.get_u8();
20248        __struct.frame =
20249            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20250                enum_type: "MavFrame",
20251                value: tmp as u64,
20252            })?;
20253        __struct.current = buf.get_u8();
20254        __struct.autocontinue = buf.get_u8();
20255        let tmp = buf.get_u8();
20256        __struct.mission_type =
20257            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20258                enum_type: "MavMissionType",
20259                value: tmp as u64,
20260            })?;
20261        Ok(__struct)
20262    }
20263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20264        let mut __tmp = BytesMut::new(bytes);
20265        #[allow(clippy::absurd_extreme_comparisons)]
20266        #[allow(unused_comparisons)]
20267        if __tmp.remaining() < Self::ENCODED_LEN {
20268            panic!(
20269                "buffer is too small (need {} bytes, but got {})",
20270                Self::ENCODED_LEN,
20271                __tmp.remaining(),
20272            )
20273        }
20274        __tmp.put_f32_le(self.param1);
20275        __tmp.put_f32_le(self.param2);
20276        __tmp.put_f32_le(self.param3);
20277        __tmp.put_f32_le(self.param4);
20278        __tmp.put_i32_le(self.x);
20279        __tmp.put_i32_le(self.y);
20280        __tmp.put_f32_le(self.z);
20281        __tmp.put_u16_le(self.seq);
20282        __tmp.put_u16_le(self.command as u16);
20283        __tmp.put_u8(self.target_system);
20284        __tmp.put_u8(self.target_component);
20285        __tmp.put_u8(self.frame as u8);
20286        __tmp.put_u8(self.current);
20287        __tmp.put_u8(self.autocontinue);
20288        if matches!(version, MavlinkVersion::V2) {
20289            __tmp.put_u8(self.mission_type as u8);
20290            let len = __tmp.len();
20291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20292        } else {
20293            __tmp.len()
20294        }
20295    }
20296}
20297#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20298#[doc = ""]
20299#[doc = "ID: 46"]
20300#[derive(Debug, Clone, PartialEq)]
20301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20303#[cfg_attr(feature = "ts", derive(TS))]
20304#[cfg_attr(feature = "ts", ts(export))]
20305pub struct MISSION_ITEM_REACHED_DATA {
20306    #[doc = "Sequence"]
20307    pub seq: u16,
20308}
20309impl MISSION_ITEM_REACHED_DATA {
20310    pub const ENCODED_LEN: usize = 2usize;
20311    pub const DEFAULT: Self = Self { seq: 0_u16 };
20312    #[cfg(feature = "arbitrary")]
20313    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20314        use arbitrary::{Arbitrary, Unstructured};
20315        let mut buf = [0u8; 1024];
20316        rng.fill_bytes(&mut buf);
20317        let mut unstructured = Unstructured::new(&buf);
20318        Self::arbitrary(&mut unstructured).unwrap_or_default()
20319    }
20320}
20321impl Default for MISSION_ITEM_REACHED_DATA {
20322    fn default() -> Self {
20323        Self::DEFAULT.clone()
20324    }
20325}
20326impl MessageData for MISSION_ITEM_REACHED_DATA {
20327    type Message = MavMessage;
20328    const ID: u32 = 46u32;
20329    const NAME: &'static str = "MISSION_ITEM_REACHED";
20330    const EXTRA_CRC: u8 = 11u8;
20331    const ENCODED_LEN: usize = 2usize;
20332    fn deser(
20333        _version: MavlinkVersion,
20334        __input: &[u8],
20335    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20336        let avail_len = __input.len();
20337        let mut payload_buf = [0; Self::ENCODED_LEN];
20338        let mut buf = if avail_len < Self::ENCODED_LEN {
20339            payload_buf[0..avail_len].copy_from_slice(__input);
20340            Bytes::new(&payload_buf)
20341        } else {
20342            Bytes::new(__input)
20343        };
20344        let mut __struct = Self::default();
20345        __struct.seq = buf.get_u16_le();
20346        Ok(__struct)
20347    }
20348    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20349        let mut __tmp = BytesMut::new(bytes);
20350        #[allow(clippy::absurd_extreme_comparisons)]
20351        #[allow(unused_comparisons)]
20352        if __tmp.remaining() < Self::ENCODED_LEN {
20353            panic!(
20354                "buffer is too small (need {} bytes, but got {})",
20355                Self::ENCODED_LEN,
20356                __tmp.remaining(),
20357            )
20358        }
20359        __tmp.put_u16_le(self.seq);
20360        if matches!(version, MavlinkVersion::V2) {
20361            let len = __tmp.len();
20362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20363        } else {
20364            __tmp.len()
20365        }
20366    }
20367}
20368#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20369#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20370#[doc = ""]
20371#[doc = "ID: 40"]
20372#[derive(Debug, Clone, PartialEq)]
20373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20374#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20375#[cfg_attr(feature = "ts", derive(TS))]
20376#[cfg_attr(feature = "ts", ts(export))]
20377pub struct MISSION_REQUEST_DATA {
20378    #[doc = "Sequence"]
20379    pub seq: u16,
20380    #[doc = "System ID"]
20381    pub target_system: u8,
20382    #[doc = "Component ID"]
20383    pub target_component: u8,
20384    #[doc = "Mission type."]
20385    #[cfg_attr(feature = "serde", serde(default))]
20386    pub mission_type: MavMissionType,
20387}
20388impl MISSION_REQUEST_DATA {
20389    pub const ENCODED_LEN: usize = 5usize;
20390    pub const DEFAULT: Self = Self {
20391        seq: 0_u16,
20392        target_system: 0_u8,
20393        target_component: 0_u8,
20394        mission_type: MavMissionType::DEFAULT,
20395    };
20396    #[cfg(feature = "arbitrary")]
20397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20398        use arbitrary::{Arbitrary, Unstructured};
20399        let mut buf = [0u8; 1024];
20400        rng.fill_bytes(&mut buf);
20401        let mut unstructured = Unstructured::new(&buf);
20402        Self::arbitrary(&mut unstructured).unwrap_or_default()
20403    }
20404}
20405impl Default for MISSION_REQUEST_DATA {
20406    fn default() -> Self {
20407        Self::DEFAULT.clone()
20408    }
20409}
20410impl MessageData for MISSION_REQUEST_DATA {
20411    type Message = MavMessage;
20412    const ID: u32 = 40u32;
20413    const NAME: &'static str = "MISSION_REQUEST";
20414    const EXTRA_CRC: u8 = 230u8;
20415    const ENCODED_LEN: usize = 5usize;
20416    fn deser(
20417        _version: MavlinkVersion,
20418        __input: &[u8],
20419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20420        let avail_len = __input.len();
20421        let mut payload_buf = [0; Self::ENCODED_LEN];
20422        let mut buf = if avail_len < Self::ENCODED_LEN {
20423            payload_buf[0..avail_len].copy_from_slice(__input);
20424            Bytes::new(&payload_buf)
20425        } else {
20426            Bytes::new(__input)
20427        };
20428        let mut __struct = Self::default();
20429        __struct.seq = buf.get_u16_le();
20430        __struct.target_system = buf.get_u8();
20431        __struct.target_component = buf.get_u8();
20432        let tmp = buf.get_u8();
20433        __struct.mission_type =
20434            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20435                enum_type: "MavMissionType",
20436                value: tmp as u64,
20437            })?;
20438        Ok(__struct)
20439    }
20440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20441        let mut __tmp = BytesMut::new(bytes);
20442        #[allow(clippy::absurd_extreme_comparisons)]
20443        #[allow(unused_comparisons)]
20444        if __tmp.remaining() < Self::ENCODED_LEN {
20445            panic!(
20446                "buffer is too small (need {} bytes, but got {})",
20447                Self::ENCODED_LEN,
20448                __tmp.remaining(),
20449            )
20450        }
20451        __tmp.put_u16_le(self.seq);
20452        __tmp.put_u8(self.target_system);
20453        __tmp.put_u8(self.target_component);
20454        if matches!(version, MavlinkVersion::V2) {
20455            __tmp.put_u8(self.mission_type as u8);
20456            let len = __tmp.len();
20457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20458        } else {
20459            __tmp.len()
20460        }
20461    }
20462}
20463#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20464#[doc = ""]
20465#[doc = "ID: 51"]
20466#[derive(Debug, Clone, PartialEq)]
20467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20469#[cfg_attr(feature = "ts", derive(TS))]
20470#[cfg_attr(feature = "ts", ts(export))]
20471pub struct MISSION_REQUEST_INT_DATA {
20472    #[doc = "Sequence"]
20473    pub seq: u16,
20474    #[doc = "System ID"]
20475    pub target_system: u8,
20476    #[doc = "Component ID"]
20477    pub target_component: u8,
20478    #[doc = "Mission type."]
20479    #[cfg_attr(feature = "serde", serde(default))]
20480    pub mission_type: MavMissionType,
20481}
20482impl MISSION_REQUEST_INT_DATA {
20483    pub const ENCODED_LEN: usize = 5usize;
20484    pub const DEFAULT: Self = Self {
20485        seq: 0_u16,
20486        target_system: 0_u8,
20487        target_component: 0_u8,
20488        mission_type: MavMissionType::DEFAULT,
20489    };
20490    #[cfg(feature = "arbitrary")]
20491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20492        use arbitrary::{Arbitrary, Unstructured};
20493        let mut buf = [0u8; 1024];
20494        rng.fill_bytes(&mut buf);
20495        let mut unstructured = Unstructured::new(&buf);
20496        Self::arbitrary(&mut unstructured).unwrap_or_default()
20497    }
20498}
20499impl Default for MISSION_REQUEST_INT_DATA {
20500    fn default() -> Self {
20501        Self::DEFAULT.clone()
20502    }
20503}
20504impl MessageData for MISSION_REQUEST_INT_DATA {
20505    type Message = MavMessage;
20506    const ID: u32 = 51u32;
20507    const NAME: &'static str = "MISSION_REQUEST_INT";
20508    const EXTRA_CRC: u8 = 196u8;
20509    const ENCODED_LEN: usize = 5usize;
20510    fn deser(
20511        _version: MavlinkVersion,
20512        __input: &[u8],
20513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20514        let avail_len = __input.len();
20515        let mut payload_buf = [0; Self::ENCODED_LEN];
20516        let mut buf = if avail_len < Self::ENCODED_LEN {
20517            payload_buf[0..avail_len].copy_from_slice(__input);
20518            Bytes::new(&payload_buf)
20519        } else {
20520            Bytes::new(__input)
20521        };
20522        let mut __struct = Self::default();
20523        __struct.seq = buf.get_u16_le();
20524        __struct.target_system = buf.get_u8();
20525        __struct.target_component = buf.get_u8();
20526        let tmp = buf.get_u8();
20527        __struct.mission_type =
20528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20529                enum_type: "MavMissionType",
20530                value: tmp as u64,
20531            })?;
20532        Ok(__struct)
20533    }
20534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20535        let mut __tmp = BytesMut::new(bytes);
20536        #[allow(clippy::absurd_extreme_comparisons)]
20537        #[allow(unused_comparisons)]
20538        if __tmp.remaining() < Self::ENCODED_LEN {
20539            panic!(
20540                "buffer is too small (need {} bytes, but got {})",
20541                Self::ENCODED_LEN,
20542                __tmp.remaining(),
20543            )
20544        }
20545        __tmp.put_u16_le(self.seq);
20546        __tmp.put_u8(self.target_system);
20547        __tmp.put_u8(self.target_component);
20548        if matches!(version, MavlinkVersion::V2) {
20549            __tmp.put_u8(self.mission_type as u8);
20550            let len = __tmp.len();
20551            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20552        } else {
20553            __tmp.len()
20554        }
20555    }
20556}
20557#[doc = "Request the overall list of mission items from the system/component."]
20558#[doc = ""]
20559#[doc = "ID: 43"]
20560#[derive(Debug, Clone, PartialEq)]
20561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20562#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20563#[cfg_attr(feature = "ts", derive(TS))]
20564#[cfg_attr(feature = "ts", ts(export))]
20565pub struct MISSION_REQUEST_LIST_DATA {
20566    #[doc = "System ID"]
20567    pub target_system: u8,
20568    #[doc = "Component ID"]
20569    pub target_component: u8,
20570    #[doc = "Mission type."]
20571    #[cfg_attr(feature = "serde", serde(default))]
20572    pub mission_type: MavMissionType,
20573}
20574impl MISSION_REQUEST_LIST_DATA {
20575    pub const ENCODED_LEN: usize = 3usize;
20576    pub const DEFAULT: Self = Self {
20577        target_system: 0_u8,
20578        target_component: 0_u8,
20579        mission_type: MavMissionType::DEFAULT,
20580    };
20581    #[cfg(feature = "arbitrary")]
20582    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20583        use arbitrary::{Arbitrary, Unstructured};
20584        let mut buf = [0u8; 1024];
20585        rng.fill_bytes(&mut buf);
20586        let mut unstructured = Unstructured::new(&buf);
20587        Self::arbitrary(&mut unstructured).unwrap_or_default()
20588    }
20589}
20590impl Default for MISSION_REQUEST_LIST_DATA {
20591    fn default() -> Self {
20592        Self::DEFAULT.clone()
20593    }
20594}
20595impl MessageData for MISSION_REQUEST_LIST_DATA {
20596    type Message = MavMessage;
20597    const ID: u32 = 43u32;
20598    const NAME: &'static str = "MISSION_REQUEST_LIST";
20599    const EXTRA_CRC: u8 = 132u8;
20600    const ENCODED_LEN: usize = 3usize;
20601    fn deser(
20602        _version: MavlinkVersion,
20603        __input: &[u8],
20604    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20605        let avail_len = __input.len();
20606        let mut payload_buf = [0; Self::ENCODED_LEN];
20607        let mut buf = if avail_len < Self::ENCODED_LEN {
20608            payload_buf[0..avail_len].copy_from_slice(__input);
20609            Bytes::new(&payload_buf)
20610        } else {
20611            Bytes::new(__input)
20612        };
20613        let mut __struct = Self::default();
20614        __struct.target_system = buf.get_u8();
20615        __struct.target_component = buf.get_u8();
20616        let tmp = buf.get_u8();
20617        __struct.mission_type =
20618            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20619                enum_type: "MavMissionType",
20620                value: tmp as u64,
20621            })?;
20622        Ok(__struct)
20623    }
20624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20625        let mut __tmp = BytesMut::new(bytes);
20626        #[allow(clippy::absurd_extreme_comparisons)]
20627        #[allow(unused_comparisons)]
20628        if __tmp.remaining() < Self::ENCODED_LEN {
20629            panic!(
20630                "buffer is too small (need {} bytes, but got {})",
20631                Self::ENCODED_LEN,
20632                __tmp.remaining(),
20633            )
20634        }
20635        __tmp.put_u8(self.target_system);
20636        __tmp.put_u8(self.target_component);
20637        if matches!(version, MavlinkVersion::V2) {
20638            __tmp.put_u8(self.mission_type as u8);
20639            let len = __tmp.len();
20640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20641        } else {
20642            __tmp.len()
20643        }
20644    }
20645}
20646#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20647#[doc = ""]
20648#[doc = "ID: 37"]
20649#[derive(Debug, Clone, PartialEq)]
20650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20652#[cfg_attr(feature = "ts", derive(TS))]
20653#[cfg_attr(feature = "ts", ts(export))]
20654pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20655    #[doc = "Start index"]
20656    pub start_index: i16,
20657    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20658    pub end_index: i16,
20659    #[doc = "System ID"]
20660    pub target_system: u8,
20661    #[doc = "Component ID"]
20662    pub target_component: u8,
20663    #[doc = "Mission type."]
20664    #[cfg_attr(feature = "serde", serde(default))]
20665    pub mission_type: MavMissionType,
20666}
20667impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20668    pub const ENCODED_LEN: usize = 7usize;
20669    pub const DEFAULT: Self = Self {
20670        start_index: 0_i16,
20671        end_index: 0_i16,
20672        target_system: 0_u8,
20673        target_component: 0_u8,
20674        mission_type: MavMissionType::DEFAULT,
20675    };
20676    #[cfg(feature = "arbitrary")]
20677    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20678        use arbitrary::{Arbitrary, Unstructured};
20679        let mut buf = [0u8; 1024];
20680        rng.fill_bytes(&mut buf);
20681        let mut unstructured = Unstructured::new(&buf);
20682        Self::arbitrary(&mut unstructured).unwrap_or_default()
20683    }
20684}
20685impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20686    fn default() -> Self {
20687        Self::DEFAULT.clone()
20688    }
20689}
20690impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20691    type Message = MavMessage;
20692    const ID: u32 = 37u32;
20693    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20694    const EXTRA_CRC: u8 = 212u8;
20695    const ENCODED_LEN: usize = 7usize;
20696    fn deser(
20697        _version: MavlinkVersion,
20698        __input: &[u8],
20699    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20700        let avail_len = __input.len();
20701        let mut payload_buf = [0; Self::ENCODED_LEN];
20702        let mut buf = if avail_len < Self::ENCODED_LEN {
20703            payload_buf[0..avail_len].copy_from_slice(__input);
20704            Bytes::new(&payload_buf)
20705        } else {
20706            Bytes::new(__input)
20707        };
20708        let mut __struct = Self::default();
20709        __struct.start_index = buf.get_i16_le();
20710        __struct.end_index = buf.get_i16_le();
20711        __struct.target_system = buf.get_u8();
20712        __struct.target_component = buf.get_u8();
20713        let tmp = buf.get_u8();
20714        __struct.mission_type =
20715            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20716                enum_type: "MavMissionType",
20717                value: tmp as u64,
20718            })?;
20719        Ok(__struct)
20720    }
20721    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20722        let mut __tmp = BytesMut::new(bytes);
20723        #[allow(clippy::absurd_extreme_comparisons)]
20724        #[allow(unused_comparisons)]
20725        if __tmp.remaining() < Self::ENCODED_LEN {
20726            panic!(
20727                "buffer is too small (need {} bytes, but got {})",
20728                Self::ENCODED_LEN,
20729                __tmp.remaining(),
20730            )
20731        }
20732        __tmp.put_i16_le(self.start_index);
20733        __tmp.put_i16_le(self.end_index);
20734        __tmp.put_u8(self.target_system);
20735        __tmp.put_u8(self.target_component);
20736        if matches!(version, MavlinkVersion::V2) {
20737            __tmp.put_u8(self.mission_type as u8);
20738            let len = __tmp.len();
20739            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20740        } else {
20741            __tmp.len()
20742        }
20743    }
20744}
20745#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20746#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20747#[doc = ""]
20748#[doc = "ID: 41"]
20749#[derive(Debug, Clone, PartialEq)]
20750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20752#[cfg_attr(feature = "ts", derive(TS))]
20753#[cfg_attr(feature = "ts", ts(export))]
20754pub struct MISSION_SET_CURRENT_DATA {
20755    #[doc = "Sequence"]
20756    pub seq: u16,
20757    #[doc = "System ID"]
20758    pub target_system: u8,
20759    #[doc = "Component ID"]
20760    pub target_component: u8,
20761}
20762impl MISSION_SET_CURRENT_DATA {
20763    pub const ENCODED_LEN: usize = 4usize;
20764    pub const DEFAULT: Self = Self {
20765        seq: 0_u16,
20766        target_system: 0_u8,
20767        target_component: 0_u8,
20768    };
20769    #[cfg(feature = "arbitrary")]
20770    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20771        use arbitrary::{Arbitrary, Unstructured};
20772        let mut buf = [0u8; 1024];
20773        rng.fill_bytes(&mut buf);
20774        let mut unstructured = Unstructured::new(&buf);
20775        Self::arbitrary(&mut unstructured).unwrap_or_default()
20776    }
20777}
20778impl Default for MISSION_SET_CURRENT_DATA {
20779    fn default() -> Self {
20780        Self::DEFAULT.clone()
20781    }
20782}
20783impl MessageData for MISSION_SET_CURRENT_DATA {
20784    type Message = MavMessage;
20785    const ID: u32 = 41u32;
20786    const NAME: &'static str = "MISSION_SET_CURRENT";
20787    const EXTRA_CRC: u8 = 28u8;
20788    const ENCODED_LEN: usize = 4usize;
20789    fn deser(
20790        _version: MavlinkVersion,
20791        __input: &[u8],
20792    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20793        let avail_len = __input.len();
20794        let mut payload_buf = [0; Self::ENCODED_LEN];
20795        let mut buf = if avail_len < Self::ENCODED_LEN {
20796            payload_buf[0..avail_len].copy_from_slice(__input);
20797            Bytes::new(&payload_buf)
20798        } else {
20799            Bytes::new(__input)
20800        };
20801        let mut __struct = Self::default();
20802        __struct.seq = buf.get_u16_le();
20803        __struct.target_system = buf.get_u8();
20804        __struct.target_component = buf.get_u8();
20805        Ok(__struct)
20806    }
20807    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20808        let mut __tmp = BytesMut::new(bytes);
20809        #[allow(clippy::absurd_extreme_comparisons)]
20810        #[allow(unused_comparisons)]
20811        if __tmp.remaining() < Self::ENCODED_LEN {
20812            panic!(
20813                "buffer is too small (need {} bytes, but got {})",
20814                Self::ENCODED_LEN,
20815                __tmp.remaining(),
20816            )
20817        }
20818        __tmp.put_u16_le(self.seq);
20819        __tmp.put_u8(self.target_system);
20820        __tmp.put_u8(self.target_component);
20821        if matches!(version, MavlinkVersion::V2) {
20822            let len = __tmp.len();
20823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20824        } else {
20825            __tmp.len()
20826        }
20827    }
20828}
20829#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20830#[doc = ""]
20831#[doc = "ID: 38"]
20832#[derive(Debug, Clone, PartialEq)]
20833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20835#[cfg_attr(feature = "ts", derive(TS))]
20836#[cfg_attr(feature = "ts", ts(export))]
20837pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20838    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20839    pub start_index: i16,
20840    #[doc = "End index, equal or greater than start index."]
20841    pub end_index: i16,
20842    #[doc = "System ID"]
20843    pub target_system: u8,
20844    #[doc = "Component ID"]
20845    pub target_component: u8,
20846    #[doc = "Mission type."]
20847    #[cfg_attr(feature = "serde", serde(default))]
20848    pub mission_type: MavMissionType,
20849}
20850impl MISSION_WRITE_PARTIAL_LIST_DATA {
20851    pub const ENCODED_LEN: usize = 7usize;
20852    pub const DEFAULT: Self = Self {
20853        start_index: 0_i16,
20854        end_index: 0_i16,
20855        target_system: 0_u8,
20856        target_component: 0_u8,
20857        mission_type: MavMissionType::DEFAULT,
20858    };
20859    #[cfg(feature = "arbitrary")]
20860    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20861        use arbitrary::{Arbitrary, Unstructured};
20862        let mut buf = [0u8; 1024];
20863        rng.fill_bytes(&mut buf);
20864        let mut unstructured = Unstructured::new(&buf);
20865        Self::arbitrary(&mut unstructured).unwrap_or_default()
20866    }
20867}
20868impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20869    fn default() -> Self {
20870        Self::DEFAULT.clone()
20871    }
20872}
20873impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20874    type Message = MavMessage;
20875    const ID: u32 = 38u32;
20876    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20877    const EXTRA_CRC: u8 = 9u8;
20878    const ENCODED_LEN: usize = 7usize;
20879    fn deser(
20880        _version: MavlinkVersion,
20881        __input: &[u8],
20882    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20883        let avail_len = __input.len();
20884        let mut payload_buf = [0; Self::ENCODED_LEN];
20885        let mut buf = if avail_len < Self::ENCODED_LEN {
20886            payload_buf[0..avail_len].copy_from_slice(__input);
20887            Bytes::new(&payload_buf)
20888        } else {
20889            Bytes::new(__input)
20890        };
20891        let mut __struct = Self::default();
20892        __struct.start_index = buf.get_i16_le();
20893        __struct.end_index = buf.get_i16_le();
20894        __struct.target_system = buf.get_u8();
20895        __struct.target_component = buf.get_u8();
20896        let tmp = buf.get_u8();
20897        __struct.mission_type =
20898            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20899                enum_type: "MavMissionType",
20900                value: tmp as u64,
20901            })?;
20902        Ok(__struct)
20903    }
20904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20905        let mut __tmp = BytesMut::new(bytes);
20906        #[allow(clippy::absurd_extreme_comparisons)]
20907        #[allow(unused_comparisons)]
20908        if __tmp.remaining() < Self::ENCODED_LEN {
20909            panic!(
20910                "buffer is too small (need {} bytes, but got {})",
20911                Self::ENCODED_LEN,
20912                __tmp.remaining(),
20913            )
20914        }
20915        __tmp.put_i16_le(self.start_index);
20916        __tmp.put_i16_le(self.end_index);
20917        __tmp.put_u8(self.target_system);
20918        __tmp.put_u8(self.target_component);
20919        if matches!(version, MavlinkVersion::V2) {
20920            __tmp.put_u8(self.mission_type as u8);
20921            let len = __tmp.len();
20922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20923        } else {
20924            __tmp.len()
20925        }
20926    }
20927}
20928#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20929#[doc = "Orientation of a mount."]
20930#[doc = ""]
20931#[doc = "ID: 265"]
20932#[derive(Debug, Clone, PartialEq)]
20933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20935#[cfg_attr(feature = "ts", derive(TS))]
20936#[cfg_attr(feature = "ts", ts(export))]
20937pub struct MOUNT_ORIENTATION_DATA {
20938    #[doc = "Timestamp (time since system boot)."]
20939    pub time_boot_ms: u32,
20940    #[doc = "Roll in global frame (set to NaN for invalid)."]
20941    pub roll: f32,
20942    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20943    pub pitch: f32,
20944    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20945    pub yaw: f32,
20946    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20948    pub yaw_absolute: f32,
20949}
20950impl MOUNT_ORIENTATION_DATA {
20951    pub const ENCODED_LEN: usize = 20usize;
20952    pub const DEFAULT: Self = Self {
20953        time_boot_ms: 0_u32,
20954        roll: 0.0_f32,
20955        pitch: 0.0_f32,
20956        yaw: 0.0_f32,
20957        yaw_absolute: 0.0_f32,
20958    };
20959    #[cfg(feature = "arbitrary")]
20960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20961        use arbitrary::{Arbitrary, Unstructured};
20962        let mut buf = [0u8; 1024];
20963        rng.fill_bytes(&mut buf);
20964        let mut unstructured = Unstructured::new(&buf);
20965        Self::arbitrary(&mut unstructured).unwrap_or_default()
20966    }
20967}
20968impl Default for MOUNT_ORIENTATION_DATA {
20969    fn default() -> Self {
20970        Self::DEFAULT.clone()
20971    }
20972}
20973impl MessageData for MOUNT_ORIENTATION_DATA {
20974    type Message = MavMessage;
20975    const ID: u32 = 265u32;
20976    const NAME: &'static str = "MOUNT_ORIENTATION";
20977    const EXTRA_CRC: u8 = 26u8;
20978    const ENCODED_LEN: usize = 20usize;
20979    fn deser(
20980        _version: MavlinkVersion,
20981        __input: &[u8],
20982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20983        let avail_len = __input.len();
20984        let mut payload_buf = [0; Self::ENCODED_LEN];
20985        let mut buf = if avail_len < Self::ENCODED_LEN {
20986            payload_buf[0..avail_len].copy_from_slice(__input);
20987            Bytes::new(&payload_buf)
20988        } else {
20989            Bytes::new(__input)
20990        };
20991        let mut __struct = Self::default();
20992        __struct.time_boot_ms = buf.get_u32_le();
20993        __struct.roll = buf.get_f32_le();
20994        __struct.pitch = buf.get_f32_le();
20995        __struct.yaw = buf.get_f32_le();
20996        __struct.yaw_absolute = buf.get_f32_le();
20997        Ok(__struct)
20998    }
20999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21000        let mut __tmp = BytesMut::new(bytes);
21001        #[allow(clippy::absurd_extreme_comparisons)]
21002        #[allow(unused_comparisons)]
21003        if __tmp.remaining() < Self::ENCODED_LEN {
21004            panic!(
21005                "buffer is too small (need {} bytes, but got {})",
21006                Self::ENCODED_LEN,
21007                __tmp.remaining(),
21008            )
21009        }
21010        __tmp.put_u32_le(self.time_boot_ms);
21011        __tmp.put_f32_le(self.roll);
21012        __tmp.put_f32_le(self.pitch);
21013        __tmp.put_f32_le(self.yaw);
21014        if matches!(version, MavlinkVersion::V2) {
21015            __tmp.put_f32_le(self.yaw_absolute);
21016            let len = __tmp.len();
21017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21018        } else {
21019            __tmp.len()
21020        }
21021    }
21022}
21023#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21024#[doc = ""]
21025#[doc = "ID: 251"]
21026#[derive(Debug, Clone, PartialEq)]
21027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21029#[cfg_attr(feature = "ts", derive(TS))]
21030#[cfg_attr(feature = "ts", ts(export))]
21031pub struct NAMED_VALUE_FLOAT_DATA {
21032    #[doc = "Timestamp (time since system boot)."]
21033    pub time_boot_ms: u32,
21034    #[doc = "Floating point value"]
21035    pub value: f32,
21036    #[doc = "Name of the debug variable"]
21037    #[cfg_attr(feature = "ts", ts(type = "string"))]
21038    pub name: CharArray<10>,
21039}
21040impl NAMED_VALUE_FLOAT_DATA {
21041    pub const ENCODED_LEN: usize = 18usize;
21042    pub const DEFAULT: Self = Self {
21043        time_boot_ms: 0_u32,
21044        value: 0.0_f32,
21045        name: CharArray::new([0_u8; 10usize]),
21046    };
21047    #[cfg(feature = "arbitrary")]
21048    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21049        use arbitrary::{Arbitrary, Unstructured};
21050        let mut buf = [0u8; 1024];
21051        rng.fill_bytes(&mut buf);
21052        let mut unstructured = Unstructured::new(&buf);
21053        Self::arbitrary(&mut unstructured).unwrap_or_default()
21054    }
21055}
21056impl Default for NAMED_VALUE_FLOAT_DATA {
21057    fn default() -> Self {
21058        Self::DEFAULT.clone()
21059    }
21060}
21061impl MessageData for NAMED_VALUE_FLOAT_DATA {
21062    type Message = MavMessage;
21063    const ID: u32 = 251u32;
21064    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21065    const EXTRA_CRC: u8 = 170u8;
21066    const ENCODED_LEN: usize = 18usize;
21067    fn deser(
21068        _version: MavlinkVersion,
21069        __input: &[u8],
21070    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21071        let avail_len = __input.len();
21072        let mut payload_buf = [0; Self::ENCODED_LEN];
21073        let mut buf = if avail_len < Self::ENCODED_LEN {
21074            payload_buf[0..avail_len].copy_from_slice(__input);
21075            Bytes::new(&payload_buf)
21076        } else {
21077            Bytes::new(__input)
21078        };
21079        let mut __struct = Self::default();
21080        __struct.time_boot_ms = buf.get_u32_le();
21081        __struct.value = buf.get_f32_le();
21082        let mut tmp = [0_u8; 10usize];
21083        for v in &mut tmp {
21084            *v = buf.get_u8();
21085        }
21086        __struct.name = CharArray::new(tmp);
21087        Ok(__struct)
21088    }
21089    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21090        let mut __tmp = BytesMut::new(bytes);
21091        #[allow(clippy::absurd_extreme_comparisons)]
21092        #[allow(unused_comparisons)]
21093        if __tmp.remaining() < Self::ENCODED_LEN {
21094            panic!(
21095                "buffer is too small (need {} bytes, but got {})",
21096                Self::ENCODED_LEN,
21097                __tmp.remaining(),
21098            )
21099        }
21100        __tmp.put_u32_le(self.time_boot_ms);
21101        __tmp.put_f32_le(self.value);
21102        for val in &self.name {
21103            __tmp.put_u8(*val);
21104        }
21105        if matches!(version, MavlinkVersion::V2) {
21106            let len = __tmp.len();
21107            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21108        } else {
21109            __tmp.len()
21110        }
21111    }
21112}
21113#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21114#[doc = ""]
21115#[doc = "ID: 252"]
21116#[derive(Debug, Clone, PartialEq)]
21117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21119#[cfg_attr(feature = "ts", derive(TS))]
21120#[cfg_attr(feature = "ts", ts(export))]
21121pub struct NAMED_VALUE_INT_DATA {
21122    #[doc = "Timestamp (time since system boot)."]
21123    pub time_boot_ms: u32,
21124    #[doc = "Signed integer value"]
21125    pub value: i32,
21126    #[doc = "Name of the debug variable"]
21127    #[cfg_attr(feature = "ts", ts(type = "string"))]
21128    pub name: CharArray<10>,
21129}
21130impl NAMED_VALUE_INT_DATA {
21131    pub const ENCODED_LEN: usize = 18usize;
21132    pub const DEFAULT: Self = Self {
21133        time_boot_ms: 0_u32,
21134        value: 0_i32,
21135        name: CharArray::new([0_u8; 10usize]),
21136    };
21137    #[cfg(feature = "arbitrary")]
21138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21139        use arbitrary::{Arbitrary, Unstructured};
21140        let mut buf = [0u8; 1024];
21141        rng.fill_bytes(&mut buf);
21142        let mut unstructured = Unstructured::new(&buf);
21143        Self::arbitrary(&mut unstructured).unwrap_or_default()
21144    }
21145}
21146impl Default for NAMED_VALUE_INT_DATA {
21147    fn default() -> Self {
21148        Self::DEFAULT.clone()
21149    }
21150}
21151impl MessageData for NAMED_VALUE_INT_DATA {
21152    type Message = MavMessage;
21153    const ID: u32 = 252u32;
21154    const NAME: &'static str = "NAMED_VALUE_INT";
21155    const EXTRA_CRC: u8 = 44u8;
21156    const ENCODED_LEN: usize = 18usize;
21157    fn deser(
21158        _version: MavlinkVersion,
21159        __input: &[u8],
21160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21161        let avail_len = __input.len();
21162        let mut payload_buf = [0; Self::ENCODED_LEN];
21163        let mut buf = if avail_len < Self::ENCODED_LEN {
21164            payload_buf[0..avail_len].copy_from_slice(__input);
21165            Bytes::new(&payload_buf)
21166        } else {
21167            Bytes::new(__input)
21168        };
21169        let mut __struct = Self::default();
21170        __struct.time_boot_ms = buf.get_u32_le();
21171        __struct.value = buf.get_i32_le();
21172        let mut tmp = [0_u8; 10usize];
21173        for v in &mut tmp {
21174            *v = buf.get_u8();
21175        }
21176        __struct.name = CharArray::new(tmp);
21177        Ok(__struct)
21178    }
21179    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21180        let mut __tmp = BytesMut::new(bytes);
21181        #[allow(clippy::absurd_extreme_comparisons)]
21182        #[allow(unused_comparisons)]
21183        if __tmp.remaining() < Self::ENCODED_LEN {
21184            panic!(
21185                "buffer is too small (need {} bytes, but got {})",
21186                Self::ENCODED_LEN,
21187                __tmp.remaining(),
21188            )
21189        }
21190        __tmp.put_u32_le(self.time_boot_ms);
21191        __tmp.put_i32_le(self.value);
21192        for val in &self.name {
21193            __tmp.put_u8(*val);
21194        }
21195        if matches!(version, MavlinkVersion::V2) {
21196            let len = __tmp.len();
21197            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21198        } else {
21199            __tmp.len()
21200        }
21201    }
21202}
21203#[doc = "The state of the navigation and position controller."]
21204#[doc = ""]
21205#[doc = "ID: 62"]
21206#[derive(Debug, Clone, PartialEq)]
21207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21209#[cfg_attr(feature = "ts", derive(TS))]
21210#[cfg_attr(feature = "ts", ts(export))]
21211pub struct NAV_CONTROLLER_OUTPUT_DATA {
21212    #[doc = "Current desired roll"]
21213    pub nav_roll: f32,
21214    #[doc = "Current desired pitch"]
21215    pub nav_pitch: f32,
21216    #[doc = "Current altitude error"]
21217    pub alt_error: f32,
21218    #[doc = "Current airspeed error"]
21219    pub aspd_error: f32,
21220    #[doc = "Current crosstrack error on x-y plane"]
21221    pub xtrack_error: f32,
21222    #[doc = "Current desired heading"]
21223    pub nav_bearing: i16,
21224    #[doc = "Bearing to current waypoint/target"]
21225    pub target_bearing: i16,
21226    #[doc = "Distance to active waypoint"]
21227    pub wp_dist: u16,
21228}
21229impl NAV_CONTROLLER_OUTPUT_DATA {
21230    pub const ENCODED_LEN: usize = 26usize;
21231    pub const DEFAULT: Self = Self {
21232        nav_roll: 0.0_f32,
21233        nav_pitch: 0.0_f32,
21234        alt_error: 0.0_f32,
21235        aspd_error: 0.0_f32,
21236        xtrack_error: 0.0_f32,
21237        nav_bearing: 0_i16,
21238        target_bearing: 0_i16,
21239        wp_dist: 0_u16,
21240    };
21241    #[cfg(feature = "arbitrary")]
21242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21243        use arbitrary::{Arbitrary, Unstructured};
21244        let mut buf = [0u8; 1024];
21245        rng.fill_bytes(&mut buf);
21246        let mut unstructured = Unstructured::new(&buf);
21247        Self::arbitrary(&mut unstructured).unwrap_or_default()
21248    }
21249}
21250impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21251    fn default() -> Self {
21252        Self::DEFAULT.clone()
21253    }
21254}
21255impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21256    type Message = MavMessage;
21257    const ID: u32 = 62u32;
21258    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21259    const EXTRA_CRC: u8 = 183u8;
21260    const ENCODED_LEN: usize = 26usize;
21261    fn deser(
21262        _version: MavlinkVersion,
21263        __input: &[u8],
21264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21265        let avail_len = __input.len();
21266        let mut payload_buf = [0; Self::ENCODED_LEN];
21267        let mut buf = if avail_len < Self::ENCODED_LEN {
21268            payload_buf[0..avail_len].copy_from_slice(__input);
21269            Bytes::new(&payload_buf)
21270        } else {
21271            Bytes::new(__input)
21272        };
21273        let mut __struct = Self::default();
21274        __struct.nav_roll = buf.get_f32_le();
21275        __struct.nav_pitch = buf.get_f32_le();
21276        __struct.alt_error = buf.get_f32_le();
21277        __struct.aspd_error = buf.get_f32_le();
21278        __struct.xtrack_error = buf.get_f32_le();
21279        __struct.nav_bearing = buf.get_i16_le();
21280        __struct.target_bearing = buf.get_i16_le();
21281        __struct.wp_dist = buf.get_u16_le();
21282        Ok(__struct)
21283    }
21284    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21285        let mut __tmp = BytesMut::new(bytes);
21286        #[allow(clippy::absurd_extreme_comparisons)]
21287        #[allow(unused_comparisons)]
21288        if __tmp.remaining() < Self::ENCODED_LEN {
21289            panic!(
21290                "buffer is too small (need {} bytes, but got {})",
21291                Self::ENCODED_LEN,
21292                __tmp.remaining(),
21293            )
21294        }
21295        __tmp.put_f32_le(self.nav_roll);
21296        __tmp.put_f32_le(self.nav_pitch);
21297        __tmp.put_f32_le(self.alt_error);
21298        __tmp.put_f32_le(self.aspd_error);
21299        __tmp.put_f32_le(self.xtrack_error);
21300        __tmp.put_i16_le(self.nav_bearing);
21301        __tmp.put_i16_le(self.target_bearing);
21302        __tmp.put_u16_le(self.wp_dist);
21303        if matches!(version, MavlinkVersion::V2) {
21304            let len = __tmp.len();
21305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21306        } else {
21307            __tmp.len()
21308        }
21309    }
21310}
21311#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21312#[doc = ""]
21313#[doc = "ID: 330"]
21314#[derive(Debug, Clone, PartialEq)]
21315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21317#[cfg_attr(feature = "ts", derive(TS))]
21318#[cfg_attr(feature = "ts", ts(export))]
21319pub struct OBSTACLE_DISTANCE_DATA {
21320    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21321    pub time_usec: u64,
21322    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21323    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21324    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21325    pub distances: [u16; 72],
21326    #[doc = "Minimum distance the sensor can measure."]
21327    pub min_distance: u16,
21328    #[doc = "Maximum distance the sensor can measure."]
21329    pub max_distance: u16,
21330    #[doc = "Class id of the distance sensor type."]
21331    pub sensor_type: MavDistanceSensor,
21332    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21333    pub increment: u8,
21334    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21336    pub increment_f: f32,
21337    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21338    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21339    pub angle_offset: f32,
21340    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21341    #[cfg_attr(feature = "serde", serde(default))]
21342    pub frame: MavFrame,
21343}
21344impl OBSTACLE_DISTANCE_DATA {
21345    pub const ENCODED_LEN: usize = 167usize;
21346    pub const DEFAULT: Self = Self {
21347        time_usec: 0_u64,
21348        distances: [0_u16; 72usize],
21349        min_distance: 0_u16,
21350        max_distance: 0_u16,
21351        sensor_type: MavDistanceSensor::DEFAULT,
21352        increment: 0_u8,
21353        increment_f: 0.0_f32,
21354        angle_offset: 0.0_f32,
21355        frame: MavFrame::DEFAULT,
21356    };
21357    #[cfg(feature = "arbitrary")]
21358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21359        use arbitrary::{Arbitrary, Unstructured};
21360        let mut buf = [0u8; 1024];
21361        rng.fill_bytes(&mut buf);
21362        let mut unstructured = Unstructured::new(&buf);
21363        Self::arbitrary(&mut unstructured).unwrap_or_default()
21364    }
21365}
21366impl Default for OBSTACLE_DISTANCE_DATA {
21367    fn default() -> Self {
21368        Self::DEFAULT.clone()
21369    }
21370}
21371impl MessageData for OBSTACLE_DISTANCE_DATA {
21372    type Message = MavMessage;
21373    const ID: u32 = 330u32;
21374    const NAME: &'static str = "OBSTACLE_DISTANCE";
21375    const EXTRA_CRC: u8 = 23u8;
21376    const ENCODED_LEN: usize = 167usize;
21377    fn deser(
21378        _version: MavlinkVersion,
21379        __input: &[u8],
21380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21381        let avail_len = __input.len();
21382        let mut payload_buf = [0; Self::ENCODED_LEN];
21383        let mut buf = if avail_len < Self::ENCODED_LEN {
21384            payload_buf[0..avail_len].copy_from_slice(__input);
21385            Bytes::new(&payload_buf)
21386        } else {
21387            Bytes::new(__input)
21388        };
21389        let mut __struct = Self::default();
21390        __struct.time_usec = buf.get_u64_le();
21391        for v in &mut __struct.distances {
21392            let val = buf.get_u16_le();
21393            *v = val;
21394        }
21395        __struct.min_distance = buf.get_u16_le();
21396        __struct.max_distance = buf.get_u16_le();
21397        let tmp = buf.get_u8();
21398        __struct.sensor_type =
21399            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21400                enum_type: "MavDistanceSensor",
21401                value: tmp as u64,
21402            })?;
21403        __struct.increment = buf.get_u8();
21404        __struct.increment_f = buf.get_f32_le();
21405        __struct.angle_offset = buf.get_f32_le();
21406        let tmp = buf.get_u8();
21407        __struct.frame =
21408            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21409                enum_type: "MavFrame",
21410                value: tmp as u64,
21411            })?;
21412        Ok(__struct)
21413    }
21414    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21415        let mut __tmp = BytesMut::new(bytes);
21416        #[allow(clippy::absurd_extreme_comparisons)]
21417        #[allow(unused_comparisons)]
21418        if __tmp.remaining() < Self::ENCODED_LEN {
21419            panic!(
21420                "buffer is too small (need {} bytes, but got {})",
21421                Self::ENCODED_LEN,
21422                __tmp.remaining(),
21423            )
21424        }
21425        __tmp.put_u64_le(self.time_usec);
21426        for val in &self.distances {
21427            __tmp.put_u16_le(*val);
21428        }
21429        __tmp.put_u16_le(self.min_distance);
21430        __tmp.put_u16_le(self.max_distance);
21431        __tmp.put_u8(self.sensor_type as u8);
21432        __tmp.put_u8(self.increment);
21433        if matches!(version, MavlinkVersion::V2) {
21434            __tmp.put_f32_le(self.increment_f);
21435            __tmp.put_f32_le(self.angle_offset);
21436            __tmp.put_u8(self.frame as u8);
21437            let len = __tmp.len();
21438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21439        } else {
21440            __tmp.len()
21441        }
21442    }
21443}
21444#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21445#[doc = ""]
21446#[doc = "ID: 331"]
21447#[derive(Debug, Clone, PartialEq)]
21448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21450#[cfg_attr(feature = "ts", derive(TS))]
21451#[cfg_attr(feature = "ts", ts(export))]
21452pub struct ODOMETRY_DATA {
21453    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21454    pub time_usec: u64,
21455    #[doc = "X Position"]
21456    pub x: f32,
21457    #[doc = "Y Position"]
21458    pub y: f32,
21459    #[doc = "Z Position"]
21460    pub z: f32,
21461    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21463    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21464    pub q: [f32; 4],
21465    #[doc = "X linear speed"]
21466    pub vx: f32,
21467    #[doc = "Y linear speed"]
21468    pub vy: f32,
21469    #[doc = "Z linear speed"]
21470    pub vz: f32,
21471    #[doc = "Roll angular speed"]
21472    pub rollspeed: f32,
21473    #[doc = "Pitch angular speed"]
21474    pub pitchspeed: f32,
21475    #[doc = "Yaw angular speed"]
21476    pub yawspeed: f32,
21477    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21479    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21480    pub pose_covariance: [f32; 21],
21481    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21483    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21484    pub velocity_covariance: [f32; 21],
21485    #[doc = "Coordinate frame of reference for the pose data."]
21486    pub frame_id: MavFrame,
21487    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21488    pub child_frame_id: MavFrame,
21489    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21490    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21491    pub reset_counter: u8,
21492    #[doc = "Type of estimator that is providing the odometry."]
21493    #[cfg_attr(feature = "serde", serde(default))]
21494    pub estimator_type: MavEstimatorType,
21495    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21496    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21497    pub quality: i8,
21498}
21499impl ODOMETRY_DATA {
21500    pub const ENCODED_LEN: usize = 233usize;
21501    pub const DEFAULT: Self = Self {
21502        time_usec: 0_u64,
21503        x: 0.0_f32,
21504        y: 0.0_f32,
21505        z: 0.0_f32,
21506        q: [0.0_f32; 4usize],
21507        vx: 0.0_f32,
21508        vy: 0.0_f32,
21509        vz: 0.0_f32,
21510        rollspeed: 0.0_f32,
21511        pitchspeed: 0.0_f32,
21512        yawspeed: 0.0_f32,
21513        pose_covariance: [0.0_f32; 21usize],
21514        velocity_covariance: [0.0_f32; 21usize],
21515        frame_id: MavFrame::DEFAULT,
21516        child_frame_id: MavFrame::DEFAULT,
21517        reset_counter: 0_u8,
21518        estimator_type: MavEstimatorType::DEFAULT,
21519        quality: 0_i8,
21520    };
21521    #[cfg(feature = "arbitrary")]
21522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21523        use arbitrary::{Arbitrary, Unstructured};
21524        let mut buf = [0u8; 1024];
21525        rng.fill_bytes(&mut buf);
21526        let mut unstructured = Unstructured::new(&buf);
21527        Self::arbitrary(&mut unstructured).unwrap_or_default()
21528    }
21529}
21530impl Default for ODOMETRY_DATA {
21531    fn default() -> Self {
21532        Self::DEFAULT.clone()
21533    }
21534}
21535impl MessageData for ODOMETRY_DATA {
21536    type Message = MavMessage;
21537    const ID: u32 = 331u32;
21538    const NAME: &'static str = "ODOMETRY";
21539    const EXTRA_CRC: u8 = 91u8;
21540    const ENCODED_LEN: usize = 233usize;
21541    fn deser(
21542        _version: MavlinkVersion,
21543        __input: &[u8],
21544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21545        let avail_len = __input.len();
21546        let mut payload_buf = [0; Self::ENCODED_LEN];
21547        let mut buf = if avail_len < Self::ENCODED_LEN {
21548            payload_buf[0..avail_len].copy_from_slice(__input);
21549            Bytes::new(&payload_buf)
21550        } else {
21551            Bytes::new(__input)
21552        };
21553        let mut __struct = Self::default();
21554        __struct.time_usec = buf.get_u64_le();
21555        __struct.x = buf.get_f32_le();
21556        __struct.y = buf.get_f32_le();
21557        __struct.z = buf.get_f32_le();
21558        for v in &mut __struct.q {
21559            let val = buf.get_f32_le();
21560            *v = val;
21561        }
21562        __struct.vx = buf.get_f32_le();
21563        __struct.vy = buf.get_f32_le();
21564        __struct.vz = buf.get_f32_le();
21565        __struct.rollspeed = buf.get_f32_le();
21566        __struct.pitchspeed = buf.get_f32_le();
21567        __struct.yawspeed = buf.get_f32_le();
21568        for v in &mut __struct.pose_covariance {
21569            let val = buf.get_f32_le();
21570            *v = val;
21571        }
21572        for v in &mut __struct.velocity_covariance {
21573            let val = buf.get_f32_le();
21574            *v = val;
21575        }
21576        let tmp = buf.get_u8();
21577        __struct.frame_id =
21578            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21579                enum_type: "MavFrame",
21580                value: tmp as u64,
21581            })?;
21582        let tmp = buf.get_u8();
21583        __struct.child_frame_id =
21584            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21585                enum_type: "MavFrame",
21586                value: tmp as u64,
21587            })?;
21588        __struct.reset_counter = buf.get_u8();
21589        let tmp = buf.get_u8();
21590        __struct.estimator_type =
21591            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21592                enum_type: "MavEstimatorType",
21593                value: tmp as u64,
21594            })?;
21595        __struct.quality = buf.get_i8();
21596        Ok(__struct)
21597    }
21598    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21599        let mut __tmp = BytesMut::new(bytes);
21600        #[allow(clippy::absurd_extreme_comparisons)]
21601        #[allow(unused_comparisons)]
21602        if __tmp.remaining() < Self::ENCODED_LEN {
21603            panic!(
21604                "buffer is too small (need {} bytes, but got {})",
21605                Self::ENCODED_LEN,
21606                __tmp.remaining(),
21607            )
21608        }
21609        __tmp.put_u64_le(self.time_usec);
21610        __tmp.put_f32_le(self.x);
21611        __tmp.put_f32_le(self.y);
21612        __tmp.put_f32_le(self.z);
21613        for val in &self.q {
21614            __tmp.put_f32_le(*val);
21615        }
21616        __tmp.put_f32_le(self.vx);
21617        __tmp.put_f32_le(self.vy);
21618        __tmp.put_f32_le(self.vz);
21619        __tmp.put_f32_le(self.rollspeed);
21620        __tmp.put_f32_le(self.pitchspeed);
21621        __tmp.put_f32_le(self.yawspeed);
21622        for val in &self.pose_covariance {
21623            __tmp.put_f32_le(*val);
21624        }
21625        for val in &self.velocity_covariance {
21626            __tmp.put_f32_le(*val);
21627        }
21628        __tmp.put_u8(self.frame_id as u8);
21629        __tmp.put_u8(self.child_frame_id as u8);
21630        if matches!(version, MavlinkVersion::V2) {
21631            __tmp.put_u8(self.reset_counter);
21632            __tmp.put_u8(self.estimator_type as u8);
21633            __tmp.put_i8(self.quality);
21634            let len = __tmp.len();
21635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21636        } else {
21637            __tmp.len()
21638        }
21639    }
21640}
21641#[doc = "Hardware status sent by an onboard computer."]
21642#[doc = ""]
21643#[doc = "ID: 390"]
21644#[derive(Debug, Clone, PartialEq)]
21645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21647#[cfg_attr(feature = "ts", derive(TS))]
21648#[cfg_attr(feature = "ts", ts(export))]
21649pub struct ONBOARD_COMPUTER_STATUS_DATA {
21650    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21651    pub time_usec: u64,
21652    #[doc = "Time since system boot."]
21653    pub uptime: u32,
21654    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21655    pub ram_usage: u32,
21656    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21657    pub ram_total: u32,
21658    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21660    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21661    pub storage_type: [u32; 4],
21662    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21663    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21664    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21665    pub storage_usage: [u32; 4],
21666    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21668    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21669    pub storage_total: [u32; 4],
21670    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21671    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21672    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21673    pub link_type: [u32; 6],
21674    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21675    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21676    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21677    pub link_tx_rate: [u32; 6],
21678    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21679    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21680    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21681    pub link_rx_rate: [u32; 6],
21682    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21684    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21685    pub link_tx_max: [u32; 6],
21686    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21687    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21688    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21689    pub link_rx_max: [u32; 6],
21690    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21691    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21692    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21693    pub fan_speed: [i16; 4],
21694    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21695    pub mavtype: u8,
21696    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21698    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21699    pub cpu_cores: [u8; 8],
21700    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21701    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21702    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21703    pub cpu_combined: [u8; 10],
21704    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21706    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21707    pub gpu_cores: [u8; 4],
21708    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21709    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21710    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21711    pub gpu_combined: [u8; 10],
21712    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21713    pub temperature_board: i8,
21714    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21716    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21717    pub temperature_core: [i8; 8],
21718}
21719impl ONBOARD_COMPUTER_STATUS_DATA {
21720    pub const ENCODED_LEN: usize = 238usize;
21721    pub const DEFAULT: Self = Self {
21722        time_usec: 0_u64,
21723        uptime: 0_u32,
21724        ram_usage: 0_u32,
21725        ram_total: 0_u32,
21726        storage_type: [0_u32; 4usize],
21727        storage_usage: [0_u32; 4usize],
21728        storage_total: [0_u32; 4usize],
21729        link_type: [0_u32; 6usize],
21730        link_tx_rate: [0_u32; 6usize],
21731        link_rx_rate: [0_u32; 6usize],
21732        link_tx_max: [0_u32; 6usize],
21733        link_rx_max: [0_u32; 6usize],
21734        fan_speed: [0_i16; 4usize],
21735        mavtype: 0_u8,
21736        cpu_cores: [0_u8; 8usize],
21737        cpu_combined: [0_u8; 10usize],
21738        gpu_cores: [0_u8; 4usize],
21739        gpu_combined: [0_u8; 10usize],
21740        temperature_board: 0_i8,
21741        temperature_core: [0_i8; 8usize],
21742    };
21743    #[cfg(feature = "arbitrary")]
21744    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21745        use arbitrary::{Arbitrary, Unstructured};
21746        let mut buf = [0u8; 1024];
21747        rng.fill_bytes(&mut buf);
21748        let mut unstructured = Unstructured::new(&buf);
21749        Self::arbitrary(&mut unstructured).unwrap_or_default()
21750    }
21751}
21752impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21753    fn default() -> Self {
21754        Self::DEFAULT.clone()
21755    }
21756}
21757impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21758    type Message = MavMessage;
21759    const ID: u32 = 390u32;
21760    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21761    const EXTRA_CRC: u8 = 156u8;
21762    const ENCODED_LEN: usize = 238usize;
21763    fn deser(
21764        _version: MavlinkVersion,
21765        __input: &[u8],
21766    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21767        let avail_len = __input.len();
21768        let mut payload_buf = [0; Self::ENCODED_LEN];
21769        let mut buf = if avail_len < Self::ENCODED_LEN {
21770            payload_buf[0..avail_len].copy_from_slice(__input);
21771            Bytes::new(&payload_buf)
21772        } else {
21773            Bytes::new(__input)
21774        };
21775        let mut __struct = Self::default();
21776        __struct.time_usec = buf.get_u64_le();
21777        __struct.uptime = buf.get_u32_le();
21778        __struct.ram_usage = buf.get_u32_le();
21779        __struct.ram_total = buf.get_u32_le();
21780        for v in &mut __struct.storage_type {
21781            let val = buf.get_u32_le();
21782            *v = val;
21783        }
21784        for v in &mut __struct.storage_usage {
21785            let val = buf.get_u32_le();
21786            *v = val;
21787        }
21788        for v in &mut __struct.storage_total {
21789            let val = buf.get_u32_le();
21790            *v = val;
21791        }
21792        for v in &mut __struct.link_type {
21793            let val = buf.get_u32_le();
21794            *v = val;
21795        }
21796        for v in &mut __struct.link_tx_rate {
21797            let val = buf.get_u32_le();
21798            *v = val;
21799        }
21800        for v in &mut __struct.link_rx_rate {
21801            let val = buf.get_u32_le();
21802            *v = val;
21803        }
21804        for v in &mut __struct.link_tx_max {
21805            let val = buf.get_u32_le();
21806            *v = val;
21807        }
21808        for v in &mut __struct.link_rx_max {
21809            let val = buf.get_u32_le();
21810            *v = val;
21811        }
21812        for v in &mut __struct.fan_speed {
21813            let val = buf.get_i16_le();
21814            *v = val;
21815        }
21816        __struct.mavtype = buf.get_u8();
21817        for v in &mut __struct.cpu_cores {
21818            let val = buf.get_u8();
21819            *v = val;
21820        }
21821        for v in &mut __struct.cpu_combined {
21822            let val = buf.get_u8();
21823            *v = val;
21824        }
21825        for v in &mut __struct.gpu_cores {
21826            let val = buf.get_u8();
21827            *v = val;
21828        }
21829        for v in &mut __struct.gpu_combined {
21830            let val = buf.get_u8();
21831            *v = val;
21832        }
21833        __struct.temperature_board = buf.get_i8();
21834        for v in &mut __struct.temperature_core {
21835            let val = buf.get_i8();
21836            *v = val;
21837        }
21838        Ok(__struct)
21839    }
21840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21841        let mut __tmp = BytesMut::new(bytes);
21842        #[allow(clippy::absurd_extreme_comparisons)]
21843        #[allow(unused_comparisons)]
21844        if __tmp.remaining() < Self::ENCODED_LEN {
21845            panic!(
21846                "buffer is too small (need {} bytes, but got {})",
21847                Self::ENCODED_LEN,
21848                __tmp.remaining(),
21849            )
21850        }
21851        __tmp.put_u64_le(self.time_usec);
21852        __tmp.put_u32_le(self.uptime);
21853        __tmp.put_u32_le(self.ram_usage);
21854        __tmp.put_u32_le(self.ram_total);
21855        for val in &self.storage_type {
21856            __tmp.put_u32_le(*val);
21857        }
21858        for val in &self.storage_usage {
21859            __tmp.put_u32_le(*val);
21860        }
21861        for val in &self.storage_total {
21862            __tmp.put_u32_le(*val);
21863        }
21864        for val in &self.link_type {
21865            __tmp.put_u32_le(*val);
21866        }
21867        for val in &self.link_tx_rate {
21868            __tmp.put_u32_le(*val);
21869        }
21870        for val in &self.link_rx_rate {
21871            __tmp.put_u32_le(*val);
21872        }
21873        for val in &self.link_tx_max {
21874            __tmp.put_u32_le(*val);
21875        }
21876        for val in &self.link_rx_max {
21877            __tmp.put_u32_le(*val);
21878        }
21879        for val in &self.fan_speed {
21880            __tmp.put_i16_le(*val);
21881        }
21882        __tmp.put_u8(self.mavtype);
21883        for val in &self.cpu_cores {
21884            __tmp.put_u8(*val);
21885        }
21886        for val in &self.cpu_combined {
21887            __tmp.put_u8(*val);
21888        }
21889        for val in &self.gpu_cores {
21890            __tmp.put_u8(*val);
21891        }
21892        for val in &self.gpu_combined {
21893            __tmp.put_u8(*val);
21894        }
21895        __tmp.put_i8(self.temperature_board);
21896        for val in &self.temperature_core {
21897            __tmp.put_i8(*val);
21898        }
21899        if matches!(version, MavlinkVersion::V2) {
21900            let len = __tmp.len();
21901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21902        } else {
21903            __tmp.len()
21904        }
21905    }
21906}
21907#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21908#[doc = ""]
21909#[doc = "ID: 12918"]
21910#[derive(Debug, Clone, PartialEq)]
21911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21913#[cfg_attr(feature = "ts", derive(TS))]
21914#[cfg_attr(feature = "ts", ts(export))]
21915pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21916    #[doc = "Status level indicating if arming is allowed."]
21917    pub status: MavOdidArmStatus,
21918    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21919    #[cfg_attr(feature = "ts", ts(type = "string"))]
21920    pub error: CharArray<50>,
21921}
21922impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21923    pub const ENCODED_LEN: usize = 51usize;
21924    pub const DEFAULT: Self = Self {
21925        status: MavOdidArmStatus::DEFAULT,
21926        error: CharArray::new([0_u8; 50usize]),
21927    };
21928    #[cfg(feature = "arbitrary")]
21929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21930        use arbitrary::{Arbitrary, Unstructured};
21931        let mut buf = [0u8; 1024];
21932        rng.fill_bytes(&mut buf);
21933        let mut unstructured = Unstructured::new(&buf);
21934        Self::arbitrary(&mut unstructured).unwrap_or_default()
21935    }
21936}
21937impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21938    fn default() -> Self {
21939        Self::DEFAULT.clone()
21940    }
21941}
21942impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21943    type Message = MavMessage;
21944    const ID: u32 = 12918u32;
21945    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21946    const EXTRA_CRC: u8 = 139u8;
21947    const ENCODED_LEN: usize = 51usize;
21948    fn deser(
21949        _version: MavlinkVersion,
21950        __input: &[u8],
21951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21952        let avail_len = __input.len();
21953        let mut payload_buf = [0; Self::ENCODED_LEN];
21954        let mut buf = if avail_len < Self::ENCODED_LEN {
21955            payload_buf[0..avail_len].copy_from_slice(__input);
21956            Bytes::new(&payload_buf)
21957        } else {
21958            Bytes::new(__input)
21959        };
21960        let mut __struct = Self::default();
21961        let tmp = buf.get_u8();
21962        __struct.status =
21963            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21964                enum_type: "MavOdidArmStatus",
21965                value: tmp as u64,
21966            })?;
21967        let mut tmp = [0_u8; 50usize];
21968        for v in &mut tmp {
21969            *v = buf.get_u8();
21970        }
21971        __struct.error = CharArray::new(tmp);
21972        Ok(__struct)
21973    }
21974    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21975        let mut __tmp = BytesMut::new(bytes);
21976        #[allow(clippy::absurd_extreme_comparisons)]
21977        #[allow(unused_comparisons)]
21978        if __tmp.remaining() < Self::ENCODED_LEN {
21979            panic!(
21980                "buffer is too small (need {} bytes, but got {})",
21981                Self::ENCODED_LEN,
21982                __tmp.remaining(),
21983            )
21984        }
21985        __tmp.put_u8(self.status as u8);
21986        for val in &self.error {
21987            __tmp.put_u8(*val);
21988        }
21989        if matches!(version, MavlinkVersion::V2) {
21990            let len = __tmp.len();
21991            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21992        } else {
21993            __tmp.len()
21994        }
21995    }
21996}
21997#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21998#[doc = ""]
21999#[doc = "ID: 12902"]
22000#[derive(Debug, Clone, PartialEq)]
22001#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22002#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22003#[cfg_attr(feature = "ts", derive(TS))]
22004#[cfg_attr(feature = "ts", ts(export))]
22005pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22006    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22007    pub timestamp: u32,
22008    #[doc = "System ID (0 for broadcast)."]
22009    pub target_system: u8,
22010    #[doc = "Component ID (0 for broadcast)."]
22011    pub target_component: u8,
22012    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22013    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22014    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22015    pub id_or_mac: [u8; 20],
22016    #[doc = "Indicates the type of authentication."]
22017    pub authentication_type: MavOdidAuthType,
22018    #[doc = "Allowed range is 0 - 15."]
22019    pub data_page: u8,
22020    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22021    pub last_page_index: u8,
22022    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22023    pub length: u8,
22024    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22025    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22026    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22027    pub authentication_data: [u8; 23],
22028}
22029impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22030    pub const ENCODED_LEN: usize = 53usize;
22031    pub const DEFAULT: Self = Self {
22032        timestamp: 0_u32,
22033        target_system: 0_u8,
22034        target_component: 0_u8,
22035        id_or_mac: [0_u8; 20usize],
22036        authentication_type: MavOdidAuthType::DEFAULT,
22037        data_page: 0_u8,
22038        last_page_index: 0_u8,
22039        length: 0_u8,
22040        authentication_data: [0_u8; 23usize],
22041    };
22042    #[cfg(feature = "arbitrary")]
22043    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22044        use arbitrary::{Arbitrary, Unstructured};
22045        let mut buf = [0u8; 1024];
22046        rng.fill_bytes(&mut buf);
22047        let mut unstructured = Unstructured::new(&buf);
22048        Self::arbitrary(&mut unstructured).unwrap_or_default()
22049    }
22050}
22051impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22052    fn default() -> Self {
22053        Self::DEFAULT.clone()
22054    }
22055}
22056impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22057    type Message = MavMessage;
22058    const ID: u32 = 12902u32;
22059    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22060    const EXTRA_CRC: u8 = 140u8;
22061    const ENCODED_LEN: usize = 53usize;
22062    fn deser(
22063        _version: MavlinkVersion,
22064        __input: &[u8],
22065    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22066        let avail_len = __input.len();
22067        let mut payload_buf = [0; Self::ENCODED_LEN];
22068        let mut buf = if avail_len < Self::ENCODED_LEN {
22069            payload_buf[0..avail_len].copy_from_slice(__input);
22070            Bytes::new(&payload_buf)
22071        } else {
22072            Bytes::new(__input)
22073        };
22074        let mut __struct = Self::default();
22075        __struct.timestamp = buf.get_u32_le();
22076        __struct.target_system = buf.get_u8();
22077        __struct.target_component = buf.get_u8();
22078        for v in &mut __struct.id_or_mac {
22079            let val = buf.get_u8();
22080            *v = val;
22081        }
22082        let tmp = buf.get_u8();
22083        __struct.authentication_type =
22084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22085                enum_type: "MavOdidAuthType",
22086                value: tmp as u64,
22087            })?;
22088        __struct.data_page = buf.get_u8();
22089        __struct.last_page_index = buf.get_u8();
22090        __struct.length = buf.get_u8();
22091        for v in &mut __struct.authentication_data {
22092            let val = buf.get_u8();
22093            *v = val;
22094        }
22095        Ok(__struct)
22096    }
22097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22098        let mut __tmp = BytesMut::new(bytes);
22099        #[allow(clippy::absurd_extreme_comparisons)]
22100        #[allow(unused_comparisons)]
22101        if __tmp.remaining() < Self::ENCODED_LEN {
22102            panic!(
22103                "buffer is too small (need {} bytes, but got {})",
22104                Self::ENCODED_LEN,
22105                __tmp.remaining(),
22106            )
22107        }
22108        __tmp.put_u32_le(self.timestamp);
22109        __tmp.put_u8(self.target_system);
22110        __tmp.put_u8(self.target_component);
22111        for val in &self.id_or_mac {
22112            __tmp.put_u8(*val);
22113        }
22114        __tmp.put_u8(self.authentication_type as u8);
22115        __tmp.put_u8(self.data_page);
22116        __tmp.put_u8(self.last_page_index);
22117        __tmp.put_u8(self.length);
22118        for val in &self.authentication_data {
22119            __tmp.put_u8(*val);
22120        }
22121        if matches!(version, MavlinkVersion::V2) {
22122            let len = __tmp.len();
22123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22124        } else {
22125            __tmp.len()
22126        }
22127    }
22128}
22129#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22130#[doc = ""]
22131#[doc = "ID: 12900"]
22132#[derive(Debug, Clone, PartialEq)]
22133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22135#[cfg_attr(feature = "ts", derive(TS))]
22136#[cfg_attr(feature = "ts", ts(export))]
22137pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22138    #[doc = "System ID (0 for broadcast)."]
22139    pub target_system: u8,
22140    #[doc = "Component ID (0 for broadcast)."]
22141    pub target_component: u8,
22142    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22143    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22144    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22145    pub id_or_mac: [u8; 20],
22146    #[doc = "Indicates the format for the uas_id field of this message."]
22147    pub id_type: MavOdidIdType,
22148    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22149    pub ua_type: MavOdidUaType,
22150    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22151    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22152    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22153    pub uas_id: [u8; 20],
22154}
22155impl OPEN_DRONE_ID_BASIC_ID_DATA {
22156    pub const ENCODED_LEN: usize = 44usize;
22157    pub const DEFAULT: Self = Self {
22158        target_system: 0_u8,
22159        target_component: 0_u8,
22160        id_or_mac: [0_u8; 20usize],
22161        id_type: MavOdidIdType::DEFAULT,
22162        ua_type: MavOdidUaType::DEFAULT,
22163        uas_id: [0_u8; 20usize],
22164    };
22165    #[cfg(feature = "arbitrary")]
22166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22167        use arbitrary::{Arbitrary, Unstructured};
22168        let mut buf = [0u8; 1024];
22169        rng.fill_bytes(&mut buf);
22170        let mut unstructured = Unstructured::new(&buf);
22171        Self::arbitrary(&mut unstructured).unwrap_or_default()
22172    }
22173}
22174impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22175    fn default() -> Self {
22176        Self::DEFAULT.clone()
22177    }
22178}
22179impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22180    type Message = MavMessage;
22181    const ID: u32 = 12900u32;
22182    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22183    const EXTRA_CRC: u8 = 114u8;
22184    const ENCODED_LEN: usize = 44usize;
22185    fn deser(
22186        _version: MavlinkVersion,
22187        __input: &[u8],
22188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22189        let avail_len = __input.len();
22190        let mut payload_buf = [0; Self::ENCODED_LEN];
22191        let mut buf = if avail_len < Self::ENCODED_LEN {
22192            payload_buf[0..avail_len].copy_from_slice(__input);
22193            Bytes::new(&payload_buf)
22194        } else {
22195            Bytes::new(__input)
22196        };
22197        let mut __struct = Self::default();
22198        __struct.target_system = buf.get_u8();
22199        __struct.target_component = buf.get_u8();
22200        for v in &mut __struct.id_or_mac {
22201            let val = buf.get_u8();
22202            *v = val;
22203        }
22204        let tmp = buf.get_u8();
22205        __struct.id_type =
22206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22207                enum_type: "MavOdidIdType",
22208                value: tmp as u64,
22209            })?;
22210        let tmp = buf.get_u8();
22211        __struct.ua_type =
22212            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22213                enum_type: "MavOdidUaType",
22214                value: tmp as u64,
22215            })?;
22216        for v in &mut __struct.uas_id {
22217            let val = buf.get_u8();
22218            *v = val;
22219        }
22220        Ok(__struct)
22221    }
22222    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22223        let mut __tmp = BytesMut::new(bytes);
22224        #[allow(clippy::absurd_extreme_comparisons)]
22225        #[allow(unused_comparisons)]
22226        if __tmp.remaining() < Self::ENCODED_LEN {
22227            panic!(
22228                "buffer is too small (need {} bytes, but got {})",
22229                Self::ENCODED_LEN,
22230                __tmp.remaining(),
22231            )
22232        }
22233        __tmp.put_u8(self.target_system);
22234        __tmp.put_u8(self.target_component);
22235        for val in &self.id_or_mac {
22236            __tmp.put_u8(*val);
22237        }
22238        __tmp.put_u8(self.id_type as u8);
22239        __tmp.put_u8(self.ua_type as u8);
22240        for val in &self.uas_id {
22241            __tmp.put_u8(*val);
22242        }
22243        if matches!(version, MavlinkVersion::V2) {
22244            let len = __tmp.len();
22245            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22246        } else {
22247            __tmp.len()
22248        }
22249    }
22250}
22251#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22252#[doc = ""]
22253#[doc = "ID: 12901"]
22254#[derive(Debug, Clone, PartialEq)]
22255#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22257#[cfg_attr(feature = "ts", derive(TS))]
22258#[cfg_attr(feature = "ts", ts(export))]
22259pub struct OPEN_DRONE_ID_LOCATION_DATA {
22260    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22261    pub latitude: i32,
22262    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22263    pub longitude: i32,
22264    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22265    pub altitude_barometric: f32,
22266    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22267    pub altitude_geodetic: f32,
22268    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22269    pub height: f32,
22270    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22271    pub timestamp: f32,
22272    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22273    pub direction: u16,
22274    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22275    pub speed_horizontal: u16,
22276    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22277    pub speed_vertical: i16,
22278    #[doc = "System ID (0 for broadcast)."]
22279    pub target_system: u8,
22280    #[doc = "Component ID (0 for broadcast)."]
22281    pub target_component: u8,
22282    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22283    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22284    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22285    pub id_or_mac: [u8; 20],
22286    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22287    pub status: MavOdidStatus,
22288    #[doc = "Indicates the reference point for the height field."]
22289    pub height_reference: MavOdidHeightRef,
22290    #[doc = "The accuracy of the horizontal position."]
22291    pub horizontal_accuracy: MavOdidHorAcc,
22292    #[doc = "The accuracy of the vertical position."]
22293    pub vertical_accuracy: MavOdidVerAcc,
22294    #[doc = "The accuracy of the barometric altitude."]
22295    pub barometer_accuracy: MavOdidVerAcc,
22296    #[doc = "The accuracy of the horizontal and vertical speed."]
22297    pub speed_accuracy: MavOdidSpeedAcc,
22298    #[doc = "The accuracy of the timestamps."]
22299    pub timestamp_accuracy: MavOdidTimeAcc,
22300}
22301impl OPEN_DRONE_ID_LOCATION_DATA {
22302    pub const ENCODED_LEN: usize = 59usize;
22303    pub const DEFAULT: Self = Self {
22304        latitude: 0_i32,
22305        longitude: 0_i32,
22306        altitude_barometric: 0.0_f32,
22307        altitude_geodetic: 0.0_f32,
22308        height: 0.0_f32,
22309        timestamp: 0.0_f32,
22310        direction: 0_u16,
22311        speed_horizontal: 0_u16,
22312        speed_vertical: 0_i16,
22313        target_system: 0_u8,
22314        target_component: 0_u8,
22315        id_or_mac: [0_u8; 20usize],
22316        status: MavOdidStatus::DEFAULT,
22317        height_reference: MavOdidHeightRef::DEFAULT,
22318        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22319        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22320        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22321        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22322        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22323    };
22324    #[cfg(feature = "arbitrary")]
22325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22326        use arbitrary::{Arbitrary, Unstructured};
22327        let mut buf = [0u8; 1024];
22328        rng.fill_bytes(&mut buf);
22329        let mut unstructured = Unstructured::new(&buf);
22330        Self::arbitrary(&mut unstructured).unwrap_or_default()
22331    }
22332}
22333impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22334    fn default() -> Self {
22335        Self::DEFAULT.clone()
22336    }
22337}
22338impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22339    type Message = MavMessage;
22340    const ID: u32 = 12901u32;
22341    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22342    const EXTRA_CRC: u8 = 254u8;
22343    const ENCODED_LEN: usize = 59usize;
22344    fn deser(
22345        _version: MavlinkVersion,
22346        __input: &[u8],
22347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22348        let avail_len = __input.len();
22349        let mut payload_buf = [0; Self::ENCODED_LEN];
22350        let mut buf = if avail_len < Self::ENCODED_LEN {
22351            payload_buf[0..avail_len].copy_from_slice(__input);
22352            Bytes::new(&payload_buf)
22353        } else {
22354            Bytes::new(__input)
22355        };
22356        let mut __struct = Self::default();
22357        __struct.latitude = buf.get_i32_le();
22358        __struct.longitude = buf.get_i32_le();
22359        __struct.altitude_barometric = buf.get_f32_le();
22360        __struct.altitude_geodetic = buf.get_f32_le();
22361        __struct.height = buf.get_f32_le();
22362        __struct.timestamp = buf.get_f32_le();
22363        __struct.direction = buf.get_u16_le();
22364        __struct.speed_horizontal = buf.get_u16_le();
22365        __struct.speed_vertical = buf.get_i16_le();
22366        __struct.target_system = buf.get_u8();
22367        __struct.target_component = buf.get_u8();
22368        for v in &mut __struct.id_or_mac {
22369            let val = buf.get_u8();
22370            *v = val;
22371        }
22372        let tmp = buf.get_u8();
22373        __struct.status =
22374            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22375                enum_type: "MavOdidStatus",
22376                value: tmp as u64,
22377            })?;
22378        let tmp = buf.get_u8();
22379        __struct.height_reference =
22380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22381                enum_type: "MavOdidHeightRef",
22382                value: tmp as u64,
22383            })?;
22384        let tmp = buf.get_u8();
22385        __struct.horizontal_accuracy =
22386            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22387                enum_type: "MavOdidHorAcc",
22388                value: tmp as u64,
22389            })?;
22390        let tmp = buf.get_u8();
22391        __struct.vertical_accuracy =
22392            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22393                enum_type: "MavOdidVerAcc",
22394                value: tmp as u64,
22395            })?;
22396        let tmp = buf.get_u8();
22397        __struct.barometer_accuracy =
22398            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22399                enum_type: "MavOdidVerAcc",
22400                value: tmp as u64,
22401            })?;
22402        let tmp = buf.get_u8();
22403        __struct.speed_accuracy =
22404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22405                enum_type: "MavOdidSpeedAcc",
22406                value: tmp as u64,
22407            })?;
22408        let tmp = buf.get_u8();
22409        __struct.timestamp_accuracy =
22410            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22411                enum_type: "MavOdidTimeAcc",
22412                value: tmp as u64,
22413            })?;
22414        Ok(__struct)
22415    }
22416    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22417        let mut __tmp = BytesMut::new(bytes);
22418        #[allow(clippy::absurd_extreme_comparisons)]
22419        #[allow(unused_comparisons)]
22420        if __tmp.remaining() < Self::ENCODED_LEN {
22421            panic!(
22422                "buffer is too small (need {} bytes, but got {})",
22423                Self::ENCODED_LEN,
22424                __tmp.remaining(),
22425            )
22426        }
22427        __tmp.put_i32_le(self.latitude);
22428        __tmp.put_i32_le(self.longitude);
22429        __tmp.put_f32_le(self.altitude_barometric);
22430        __tmp.put_f32_le(self.altitude_geodetic);
22431        __tmp.put_f32_le(self.height);
22432        __tmp.put_f32_le(self.timestamp);
22433        __tmp.put_u16_le(self.direction);
22434        __tmp.put_u16_le(self.speed_horizontal);
22435        __tmp.put_i16_le(self.speed_vertical);
22436        __tmp.put_u8(self.target_system);
22437        __tmp.put_u8(self.target_component);
22438        for val in &self.id_or_mac {
22439            __tmp.put_u8(*val);
22440        }
22441        __tmp.put_u8(self.status as u8);
22442        __tmp.put_u8(self.height_reference as u8);
22443        __tmp.put_u8(self.horizontal_accuracy as u8);
22444        __tmp.put_u8(self.vertical_accuracy as u8);
22445        __tmp.put_u8(self.barometer_accuracy as u8);
22446        __tmp.put_u8(self.speed_accuracy as u8);
22447        __tmp.put_u8(self.timestamp_accuracy as u8);
22448        if matches!(version, MavlinkVersion::V2) {
22449            let len = __tmp.len();
22450            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22451        } else {
22452            __tmp.len()
22453        }
22454    }
22455}
22456#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22457#[doc = ""]
22458#[doc = "ID: 12915"]
22459#[derive(Debug, Clone, PartialEq)]
22460#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22462#[cfg_attr(feature = "ts", derive(TS))]
22463#[cfg_attr(feature = "ts", ts(export))]
22464pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22465    #[doc = "System ID (0 for broadcast)."]
22466    pub target_system: u8,
22467    #[doc = "Component ID (0 for broadcast)."]
22468    pub target_component: u8,
22469    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22472    pub id_or_mac: [u8; 20],
22473    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22474    pub single_message_size: u8,
22475    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22476    pub msg_pack_size: u8,
22477    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22479    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22480    pub messages: [u8; 225],
22481}
22482impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22483    pub const ENCODED_LEN: usize = 249usize;
22484    pub const DEFAULT: Self = Self {
22485        target_system: 0_u8,
22486        target_component: 0_u8,
22487        id_or_mac: [0_u8; 20usize],
22488        single_message_size: 0_u8,
22489        msg_pack_size: 0_u8,
22490        messages: [0_u8; 225usize],
22491    };
22492    #[cfg(feature = "arbitrary")]
22493    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22494        use arbitrary::{Arbitrary, Unstructured};
22495        let mut buf = [0u8; 1024];
22496        rng.fill_bytes(&mut buf);
22497        let mut unstructured = Unstructured::new(&buf);
22498        Self::arbitrary(&mut unstructured).unwrap_or_default()
22499    }
22500}
22501impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22502    fn default() -> Self {
22503        Self::DEFAULT.clone()
22504    }
22505}
22506impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22507    type Message = MavMessage;
22508    const ID: u32 = 12915u32;
22509    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22510    const EXTRA_CRC: u8 = 94u8;
22511    const ENCODED_LEN: usize = 249usize;
22512    fn deser(
22513        _version: MavlinkVersion,
22514        __input: &[u8],
22515    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22516        let avail_len = __input.len();
22517        let mut payload_buf = [0; Self::ENCODED_LEN];
22518        let mut buf = if avail_len < Self::ENCODED_LEN {
22519            payload_buf[0..avail_len].copy_from_slice(__input);
22520            Bytes::new(&payload_buf)
22521        } else {
22522            Bytes::new(__input)
22523        };
22524        let mut __struct = Self::default();
22525        __struct.target_system = buf.get_u8();
22526        __struct.target_component = buf.get_u8();
22527        for v in &mut __struct.id_or_mac {
22528            let val = buf.get_u8();
22529            *v = val;
22530        }
22531        __struct.single_message_size = buf.get_u8();
22532        __struct.msg_pack_size = buf.get_u8();
22533        for v in &mut __struct.messages {
22534            let val = buf.get_u8();
22535            *v = val;
22536        }
22537        Ok(__struct)
22538    }
22539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22540        let mut __tmp = BytesMut::new(bytes);
22541        #[allow(clippy::absurd_extreme_comparisons)]
22542        #[allow(unused_comparisons)]
22543        if __tmp.remaining() < Self::ENCODED_LEN {
22544            panic!(
22545                "buffer is too small (need {} bytes, but got {})",
22546                Self::ENCODED_LEN,
22547                __tmp.remaining(),
22548            )
22549        }
22550        __tmp.put_u8(self.target_system);
22551        __tmp.put_u8(self.target_component);
22552        for val in &self.id_or_mac {
22553            __tmp.put_u8(*val);
22554        }
22555        __tmp.put_u8(self.single_message_size);
22556        __tmp.put_u8(self.msg_pack_size);
22557        for val in &self.messages {
22558            __tmp.put_u8(*val);
22559        }
22560        if matches!(version, MavlinkVersion::V2) {
22561            let len = __tmp.len();
22562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22563        } else {
22564            __tmp.len()
22565        }
22566    }
22567}
22568#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22569#[doc = ""]
22570#[doc = "ID: 12905"]
22571#[derive(Debug, Clone, PartialEq)]
22572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22574#[cfg_attr(feature = "ts", derive(TS))]
22575#[cfg_attr(feature = "ts", ts(export))]
22576pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22577    #[doc = "System ID (0 for broadcast)."]
22578    pub target_system: u8,
22579    #[doc = "Component ID (0 for broadcast)."]
22580    pub target_component: u8,
22581    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22582    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22583    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22584    pub id_or_mac: [u8; 20],
22585    #[doc = "Indicates the type of the operator_id field."]
22586    pub operator_id_type: MavOdidOperatorIdType,
22587    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22588    #[cfg_attr(feature = "ts", ts(type = "string"))]
22589    pub operator_id: CharArray<20>,
22590}
22591impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22592    pub const ENCODED_LEN: usize = 43usize;
22593    pub const DEFAULT: Self = Self {
22594        target_system: 0_u8,
22595        target_component: 0_u8,
22596        id_or_mac: [0_u8; 20usize],
22597        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22598        operator_id: CharArray::new([0_u8; 20usize]),
22599    };
22600    #[cfg(feature = "arbitrary")]
22601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22602        use arbitrary::{Arbitrary, Unstructured};
22603        let mut buf = [0u8; 1024];
22604        rng.fill_bytes(&mut buf);
22605        let mut unstructured = Unstructured::new(&buf);
22606        Self::arbitrary(&mut unstructured).unwrap_or_default()
22607    }
22608}
22609impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22610    fn default() -> Self {
22611        Self::DEFAULT.clone()
22612    }
22613}
22614impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22615    type Message = MavMessage;
22616    const ID: u32 = 12905u32;
22617    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22618    const EXTRA_CRC: u8 = 49u8;
22619    const ENCODED_LEN: usize = 43usize;
22620    fn deser(
22621        _version: MavlinkVersion,
22622        __input: &[u8],
22623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22624        let avail_len = __input.len();
22625        let mut payload_buf = [0; Self::ENCODED_LEN];
22626        let mut buf = if avail_len < Self::ENCODED_LEN {
22627            payload_buf[0..avail_len].copy_from_slice(__input);
22628            Bytes::new(&payload_buf)
22629        } else {
22630            Bytes::new(__input)
22631        };
22632        let mut __struct = Self::default();
22633        __struct.target_system = buf.get_u8();
22634        __struct.target_component = buf.get_u8();
22635        for v in &mut __struct.id_or_mac {
22636            let val = buf.get_u8();
22637            *v = val;
22638        }
22639        let tmp = buf.get_u8();
22640        __struct.operator_id_type =
22641            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22642                enum_type: "MavOdidOperatorIdType",
22643                value: tmp as u64,
22644            })?;
22645        let mut tmp = [0_u8; 20usize];
22646        for v in &mut tmp {
22647            *v = buf.get_u8();
22648        }
22649        __struct.operator_id = CharArray::new(tmp);
22650        Ok(__struct)
22651    }
22652    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22653        let mut __tmp = BytesMut::new(bytes);
22654        #[allow(clippy::absurd_extreme_comparisons)]
22655        #[allow(unused_comparisons)]
22656        if __tmp.remaining() < Self::ENCODED_LEN {
22657            panic!(
22658                "buffer is too small (need {} bytes, but got {})",
22659                Self::ENCODED_LEN,
22660                __tmp.remaining(),
22661            )
22662        }
22663        __tmp.put_u8(self.target_system);
22664        __tmp.put_u8(self.target_component);
22665        for val in &self.id_or_mac {
22666            __tmp.put_u8(*val);
22667        }
22668        __tmp.put_u8(self.operator_id_type as u8);
22669        for val in &self.operator_id {
22670            __tmp.put_u8(*val);
22671        }
22672        if matches!(version, MavlinkVersion::V2) {
22673            let len = __tmp.len();
22674            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22675        } else {
22676            __tmp.len()
22677        }
22678    }
22679}
22680#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22681#[doc = ""]
22682#[doc = "ID: 12903"]
22683#[derive(Debug, Clone, PartialEq)]
22684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22686#[cfg_attr(feature = "ts", derive(TS))]
22687#[cfg_attr(feature = "ts", ts(export))]
22688pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22689    #[doc = "System ID (0 for broadcast)."]
22690    pub target_system: u8,
22691    #[doc = "Component ID (0 for broadcast)."]
22692    pub target_component: u8,
22693    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22694    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22695    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22696    pub id_or_mac: [u8; 20],
22697    #[doc = "Indicates the type of the description field."]
22698    pub description_type: MavOdidDescType,
22699    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22700    #[cfg_attr(feature = "ts", ts(type = "string"))]
22701    pub description: CharArray<23>,
22702}
22703impl OPEN_DRONE_ID_SELF_ID_DATA {
22704    pub const ENCODED_LEN: usize = 46usize;
22705    pub const DEFAULT: Self = Self {
22706        target_system: 0_u8,
22707        target_component: 0_u8,
22708        id_or_mac: [0_u8; 20usize],
22709        description_type: MavOdidDescType::DEFAULT,
22710        description: CharArray::new([0_u8; 23usize]),
22711    };
22712    #[cfg(feature = "arbitrary")]
22713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22714        use arbitrary::{Arbitrary, Unstructured};
22715        let mut buf = [0u8; 1024];
22716        rng.fill_bytes(&mut buf);
22717        let mut unstructured = Unstructured::new(&buf);
22718        Self::arbitrary(&mut unstructured).unwrap_or_default()
22719    }
22720}
22721impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22722    fn default() -> Self {
22723        Self::DEFAULT.clone()
22724    }
22725}
22726impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22727    type Message = MavMessage;
22728    const ID: u32 = 12903u32;
22729    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22730    const EXTRA_CRC: u8 = 249u8;
22731    const ENCODED_LEN: usize = 46usize;
22732    fn deser(
22733        _version: MavlinkVersion,
22734        __input: &[u8],
22735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22736        let avail_len = __input.len();
22737        let mut payload_buf = [0; Self::ENCODED_LEN];
22738        let mut buf = if avail_len < Self::ENCODED_LEN {
22739            payload_buf[0..avail_len].copy_from_slice(__input);
22740            Bytes::new(&payload_buf)
22741        } else {
22742            Bytes::new(__input)
22743        };
22744        let mut __struct = Self::default();
22745        __struct.target_system = buf.get_u8();
22746        __struct.target_component = buf.get_u8();
22747        for v in &mut __struct.id_or_mac {
22748            let val = buf.get_u8();
22749            *v = val;
22750        }
22751        let tmp = buf.get_u8();
22752        __struct.description_type =
22753            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22754                enum_type: "MavOdidDescType",
22755                value: tmp as u64,
22756            })?;
22757        let mut tmp = [0_u8; 23usize];
22758        for v in &mut tmp {
22759            *v = buf.get_u8();
22760        }
22761        __struct.description = CharArray::new(tmp);
22762        Ok(__struct)
22763    }
22764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22765        let mut __tmp = BytesMut::new(bytes);
22766        #[allow(clippy::absurd_extreme_comparisons)]
22767        #[allow(unused_comparisons)]
22768        if __tmp.remaining() < Self::ENCODED_LEN {
22769            panic!(
22770                "buffer is too small (need {} bytes, but got {})",
22771                Self::ENCODED_LEN,
22772                __tmp.remaining(),
22773            )
22774        }
22775        __tmp.put_u8(self.target_system);
22776        __tmp.put_u8(self.target_component);
22777        for val in &self.id_or_mac {
22778            __tmp.put_u8(*val);
22779        }
22780        __tmp.put_u8(self.description_type as u8);
22781        for val in &self.description {
22782            __tmp.put_u8(*val);
22783        }
22784        if matches!(version, MavlinkVersion::V2) {
22785            let len = __tmp.len();
22786            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22787        } else {
22788            __tmp.len()
22789        }
22790    }
22791}
22792#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22793#[doc = ""]
22794#[doc = "ID: 12904"]
22795#[derive(Debug, Clone, PartialEq)]
22796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22798#[cfg_attr(feature = "ts", derive(TS))]
22799#[cfg_attr(feature = "ts", ts(export))]
22800pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22801    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22802    pub operator_latitude: i32,
22803    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22804    pub operator_longitude: i32,
22805    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22806    pub area_ceiling: f32,
22807    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22808    pub area_floor: f32,
22809    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22810    pub operator_altitude_geo: f32,
22811    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22812    pub timestamp: u32,
22813    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22814    pub area_count: u16,
22815    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22816    pub area_radius: u16,
22817    #[doc = "System ID (0 for broadcast)."]
22818    pub target_system: u8,
22819    #[doc = "Component ID (0 for broadcast)."]
22820    pub target_component: u8,
22821    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22822    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22823    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22824    pub id_or_mac: [u8; 20],
22825    #[doc = "Specifies the operator location type."]
22826    pub operator_location_type: MavOdidOperatorLocationType,
22827    #[doc = "Specifies the classification type of the UA."]
22828    pub classification_type: MavOdidClassificationType,
22829    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22830    pub category_eu: MavOdidCategoryEu,
22831    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22832    pub class_eu: MavOdidClassEu,
22833}
22834impl OPEN_DRONE_ID_SYSTEM_DATA {
22835    pub const ENCODED_LEN: usize = 54usize;
22836    pub const DEFAULT: Self = Self {
22837        operator_latitude: 0_i32,
22838        operator_longitude: 0_i32,
22839        area_ceiling: 0.0_f32,
22840        area_floor: 0.0_f32,
22841        operator_altitude_geo: 0.0_f32,
22842        timestamp: 0_u32,
22843        area_count: 0_u16,
22844        area_radius: 0_u16,
22845        target_system: 0_u8,
22846        target_component: 0_u8,
22847        id_or_mac: [0_u8; 20usize],
22848        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22849        classification_type: MavOdidClassificationType::DEFAULT,
22850        category_eu: MavOdidCategoryEu::DEFAULT,
22851        class_eu: MavOdidClassEu::DEFAULT,
22852    };
22853    #[cfg(feature = "arbitrary")]
22854    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22855        use arbitrary::{Arbitrary, Unstructured};
22856        let mut buf = [0u8; 1024];
22857        rng.fill_bytes(&mut buf);
22858        let mut unstructured = Unstructured::new(&buf);
22859        Self::arbitrary(&mut unstructured).unwrap_or_default()
22860    }
22861}
22862impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22863    fn default() -> Self {
22864        Self::DEFAULT.clone()
22865    }
22866}
22867impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22868    type Message = MavMessage;
22869    const ID: u32 = 12904u32;
22870    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22871    const EXTRA_CRC: u8 = 77u8;
22872    const ENCODED_LEN: usize = 54usize;
22873    fn deser(
22874        _version: MavlinkVersion,
22875        __input: &[u8],
22876    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22877        let avail_len = __input.len();
22878        let mut payload_buf = [0; Self::ENCODED_LEN];
22879        let mut buf = if avail_len < Self::ENCODED_LEN {
22880            payload_buf[0..avail_len].copy_from_slice(__input);
22881            Bytes::new(&payload_buf)
22882        } else {
22883            Bytes::new(__input)
22884        };
22885        let mut __struct = Self::default();
22886        __struct.operator_latitude = buf.get_i32_le();
22887        __struct.operator_longitude = buf.get_i32_le();
22888        __struct.area_ceiling = buf.get_f32_le();
22889        __struct.area_floor = buf.get_f32_le();
22890        __struct.operator_altitude_geo = buf.get_f32_le();
22891        __struct.timestamp = buf.get_u32_le();
22892        __struct.area_count = buf.get_u16_le();
22893        __struct.area_radius = buf.get_u16_le();
22894        __struct.target_system = buf.get_u8();
22895        __struct.target_component = buf.get_u8();
22896        for v in &mut __struct.id_or_mac {
22897            let val = buf.get_u8();
22898            *v = val;
22899        }
22900        let tmp = buf.get_u8();
22901        __struct.operator_location_type =
22902            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22903                enum_type: "MavOdidOperatorLocationType",
22904                value: tmp as u64,
22905            })?;
22906        let tmp = buf.get_u8();
22907        __struct.classification_type =
22908            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22909                enum_type: "MavOdidClassificationType",
22910                value: tmp as u64,
22911            })?;
22912        let tmp = buf.get_u8();
22913        __struct.category_eu =
22914            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22915                enum_type: "MavOdidCategoryEu",
22916                value: tmp as u64,
22917            })?;
22918        let tmp = buf.get_u8();
22919        __struct.class_eu =
22920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22921                enum_type: "MavOdidClassEu",
22922                value: tmp as u64,
22923            })?;
22924        Ok(__struct)
22925    }
22926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22927        let mut __tmp = BytesMut::new(bytes);
22928        #[allow(clippy::absurd_extreme_comparisons)]
22929        #[allow(unused_comparisons)]
22930        if __tmp.remaining() < Self::ENCODED_LEN {
22931            panic!(
22932                "buffer is too small (need {} bytes, but got {})",
22933                Self::ENCODED_LEN,
22934                __tmp.remaining(),
22935            )
22936        }
22937        __tmp.put_i32_le(self.operator_latitude);
22938        __tmp.put_i32_le(self.operator_longitude);
22939        __tmp.put_f32_le(self.area_ceiling);
22940        __tmp.put_f32_le(self.area_floor);
22941        __tmp.put_f32_le(self.operator_altitude_geo);
22942        __tmp.put_u32_le(self.timestamp);
22943        __tmp.put_u16_le(self.area_count);
22944        __tmp.put_u16_le(self.area_radius);
22945        __tmp.put_u8(self.target_system);
22946        __tmp.put_u8(self.target_component);
22947        for val in &self.id_or_mac {
22948            __tmp.put_u8(*val);
22949        }
22950        __tmp.put_u8(self.operator_location_type as u8);
22951        __tmp.put_u8(self.classification_type as u8);
22952        __tmp.put_u8(self.category_eu as u8);
22953        __tmp.put_u8(self.class_eu as u8);
22954        if matches!(version, MavlinkVersion::V2) {
22955            let len = __tmp.len();
22956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22957        } else {
22958            __tmp.len()
22959        }
22960    }
22961}
22962#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22963#[doc = ""]
22964#[doc = "ID: 12919"]
22965#[derive(Debug, Clone, PartialEq)]
22966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22968#[cfg_attr(feature = "ts", derive(TS))]
22969#[cfg_attr(feature = "ts", ts(export))]
22970pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22971    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22972    pub operator_latitude: i32,
22973    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22974    pub operator_longitude: i32,
22975    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22976    pub operator_altitude_geo: f32,
22977    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22978    pub timestamp: u32,
22979    #[doc = "System ID (0 for broadcast)."]
22980    pub target_system: u8,
22981    #[doc = "Component ID (0 for broadcast)."]
22982    pub target_component: u8,
22983}
22984impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22985    pub const ENCODED_LEN: usize = 18usize;
22986    pub const DEFAULT: Self = Self {
22987        operator_latitude: 0_i32,
22988        operator_longitude: 0_i32,
22989        operator_altitude_geo: 0.0_f32,
22990        timestamp: 0_u32,
22991        target_system: 0_u8,
22992        target_component: 0_u8,
22993    };
22994    #[cfg(feature = "arbitrary")]
22995    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22996        use arbitrary::{Arbitrary, Unstructured};
22997        let mut buf = [0u8; 1024];
22998        rng.fill_bytes(&mut buf);
22999        let mut unstructured = Unstructured::new(&buf);
23000        Self::arbitrary(&mut unstructured).unwrap_or_default()
23001    }
23002}
23003impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23004    fn default() -> Self {
23005        Self::DEFAULT.clone()
23006    }
23007}
23008impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23009    type Message = MavMessage;
23010    const ID: u32 = 12919u32;
23011    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23012    const EXTRA_CRC: u8 = 7u8;
23013    const ENCODED_LEN: usize = 18usize;
23014    fn deser(
23015        _version: MavlinkVersion,
23016        __input: &[u8],
23017    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23018        let avail_len = __input.len();
23019        let mut payload_buf = [0; Self::ENCODED_LEN];
23020        let mut buf = if avail_len < Self::ENCODED_LEN {
23021            payload_buf[0..avail_len].copy_from_slice(__input);
23022            Bytes::new(&payload_buf)
23023        } else {
23024            Bytes::new(__input)
23025        };
23026        let mut __struct = Self::default();
23027        __struct.operator_latitude = buf.get_i32_le();
23028        __struct.operator_longitude = buf.get_i32_le();
23029        __struct.operator_altitude_geo = buf.get_f32_le();
23030        __struct.timestamp = buf.get_u32_le();
23031        __struct.target_system = buf.get_u8();
23032        __struct.target_component = buf.get_u8();
23033        Ok(__struct)
23034    }
23035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23036        let mut __tmp = BytesMut::new(bytes);
23037        #[allow(clippy::absurd_extreme_comparisons)]
23038        #[allow(unused_comparisons)]
23039        if __tmp.remaining() < Self::ENCODED_LEN {
23040            panic!(
23041                "buffer is too small (need {} bytes, but got {})",
23042                Self::ENCODED_LEN,
23043                __tmp.remaining(),
23044            )
23045        }
23046        __tmp.put_i32_le(self.operator_latitude);
23047        __tmp.put_i32_le(self.operator_longitude);
23048        __tmp.put_f32_le(self.operator_altitude_geo);
23049        __tmp.put_u32_le(self.timestamp);
23050        __tmp.put_u8(self.target_system);
23051        __tmp.put_u8(self.target_component);
23052        if matches!(version, MavlinkVersion::V2) {
23053            let len = __tmp.len();
23054            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23055        } else {
23056            __tmp.len()
23057        }
23058    }
23059}
23060#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23061#[doc = ""]
23062#[doc = "ID: 100"]
23063#[derive(Debug, Clone, PartialEq)]
23064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23066#[cfg_attr(feature = "ts", derive(TS))]
23067#[cfg_attr(feature = "ts", ts(export))]
23068pub struct OPTICAL_FLOW_DATA {
23069    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23070    pub time_usec: u64,
23071    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23072    pub flow_comp_m_x: f32,
23073    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23074    pub flow_comp_m_y: f32,
23075    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23076    pub ground_distance: f32,
23077    #[doc = "Flow in x-sensor direction"]
23078    pub flow_x: i16,
23079    #[doc = "Flow in y-sensor direction"]
23080    pub flow_y: i16,
23081    #[doc = "Sensor ID"]
23082    pub sensor_id: u8,
23083    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23084    pub quality: u8,
23085    #[doc = "Flow rate about X axis"]
23086    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23087    pub flow_rate_x: f32,
23088    #[doc = "Flow rate about Y axis"]
23089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23090    pub flow_rate_y: f32,
23091}
23092impl OPTICAL_FLOW_DATA {
23093    pub const ENCODED_LEN: usize = 34usize;
23094    pub const DEFAULT: Self = Self {
23095        time_usec: 0_u64,
23096        flow_comp_m_x: 0.0_f32,
23097        flow_comp_m_y: 0.0_f32,
23098        ground_distance: 0.0_f32,
23099        flow_x: 0_i16,
23100        flow_y: 0_i16,
23101        sensor_id: 0_u8,
23102        quality: 0_u8,
23103        flow_rate_x: 0.0_f32,
23104        flow_rate_y: 0.0_f32,
23105    };
23106    #[cfg(feature = "arbitrary")]
23107    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23108        use arbitrary::{Arbitrary, Unstructured};
23109        let mut buf = [0u8; 1024];
23110        rng.fill_bytes(&mut buf);
23111        let mut unstructured = Unstructured::new(&buf);
23112        Self::arbitrary(&mut unstructured).unwrap_or_default()
23113    }
23114}
23115impl Default for OPTICAL_FLOW_DATA {
23116    fn default() -> Self {
23117        Self::DEFAULT.clone()
23118    }
23119}
23120impl MessageData for OPTICAL_FLOW_DATA {
23121    type Message = MavMessage;
23122    const ID: u32 = 100u32;
23123    const NAME: &'static str = "OPTICAL_FLOW";
23124    const EXTRA_CRC: u8 = 175u8;
23125    const ENCODED_LEN: usize = 34usize;
23126    fn deser(
23127        _version: MavlinkVersion,
23128        __input: &[u8],
23129    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23130        let avail_len = __input.len();
23131        let mut payload_buf = [0; Self::ENCODED_LEN];
23132        let mut buf = if avail_len < Self::ENCODED_LEN {
23133            payload_buf[0..avail_len].copy_from_slice(__input);
23134            Bytes::new(&payload_buf)
23135        } else {
23136            Bytes::new(__input)
23137        };
23138        let mut __struct = Self::default();
23139        __struct.time_usec = buf.get_u64_le();
23140        __struct.flow_comp_m_x = buf.get_f32_le();
23141        __struct.flow_comp_m_y = buf.get_f32_le();
23142        __struct.ground_distance = buf.get_f32_le();
23143        __struct.flow_x = buf.get_i16_le();
23144        __struct.flow_y = buf.get_i16_le();
23145        __struct.sensor_id = buf.get_u8();
23146        __struct.quality = buf.get_u8();
23147        __struct.flow_rate_x = buf.get_f32_le();
23148        __struct.flow_rate_y = buf.get_f32_le();
23149        Ok(__struct)
23150    }
23151    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23152        let mut __tmp = BytesMut::new(bytes);
23153        #[allow(clippy::absurd_extreme_comparisons)]
23154        #[allow(unused_comparisons)]
23155        if __tmp.remaining() < Self::ENCODED_LEN {
23156            panic!(
23157                "buffer is too small (need {} bytes, but got {})",
23158                Self::ENCODED_LEN,
23159                __tmp.remaining(),
23160            )
23161        }
23162        __tmp.put_u64_le(self.time_usec);
23163        __tmp.put_f32_le(self.flow_comp_m_x);
23164        __tmp.put_f32_le(self.flow_comp_m_y);
23165        __tmp.put_f32_le(self.ground_distance);
23166        __tmp.put_i16_le(self.flow_x);
23167        __tmp.put_i16_le(self.flow_y);
23168        __tmp.put_u8(self.sensor_id);
23169        __tmp.put_u8(self.quality);
23170        if matches!(version, MavlinkVersion::V2) {
23171            __tmp.put_f32_le(self.flow_rate_x);
23172            __tmp.put_f32_le(self.flow_rate_y);
23173            let len = __tmp.len();
23174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23175        } else {
23176            __tmp.len()
23177        }
23178    }
23179}
23180#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23181#[doc = ""]
23182#[doc = "ID: 106"]
23183#[derive(Debug, Clone, PartialEq)]
23184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23186#[cfg_attr(feature = "ts", derive(TS))]
23187#[cfg_attr(feature = "ts", ts(export))]
23188pub struct OPTICAL_FLOW_RAD_DATA {
23189    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23190    pub time_usec: u64,
23191    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23192    pub integration_time_us: u32,
23193    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23194    pub integrated_x: f32,
23195    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23196    pub integrated_y: f32,
23197    #[doc = "RH rotation around X axis"]
23198    pub integrated_xgyro: f32,
23199    #[doc = "RH rotation around Y axis"]
23200    pub integrated_ygyro: f32,
23201    #[doc = "RH rotation around Z axis"]
23202    pub integrated_zgyro: f32,
23203    #[doc = "Time since the distance was sampled."]
23204    pub time_delta_distance_us: u32,
23205    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23206    pub distance: f32,
23207    #[doc = "Temperature"]
23208    pub temperature: i16,
23209    #[doc = "Sensor ID"]
23210    pub sensor_id: u8,
23211    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23212    pub quality: u8,
23213}
23214impl OPTICAL_FLOW_RAD_DATA {
23215    pub const ENCODED_LEN: usize = 44usize;
23216    pub const DEFAULT: Self = Self {
23217        time_usec: 0_u64,
23218        integration_time_us: 0_u32,
23219        integrated_x: 0.0_f32,
23220        integrated_y: 0.0_f32,
23221        integrated_xgyro: 0.0_f32,
23222        integrated_ygyro: 0.0_f32,
23223        integrated_zgyro: 0.0_f32,
23224        time_delta_distance_us: 0_u32,
23225        distance: 0.0_f32,
23226        temperature: 0_i16,
23227        sensor_id: 0_u8,
23228        quality: 0_u8,
23229    };
23230    #[cfg(feature = "arbitrary")]
23231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23232        use arbitrary::{Arbitrary, Unstructured};
23233        let mut buf = [0u8; 1024];
23234        rng.fill_bytes(&mut buf);
23235        let mut unstructured = Unstructured::new(&buf);
23236        Self::arbitrary(&mut unstructured).unwrap_or_default()
23237    }
23238}
23239impl Default for OPTICAL_FLOW_RAD_DATA {
23240    fn default() -> Self {
23241        Self::DEFAULT.clone()
23242    }
23243}
23244impl MessageData for OPTICAL_FLOW_RAD_DATA {
23245    type Message = MavMessage;
23246    const ID: u32 = 106u32;
23247    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23248    const EXTRA_CRC: u8 = 138u8;
23249    const ENCODED_LEN: usize = 44usize;
23250    fn deser(
23251        _version: MavlinkVersion,
23252        __input: &[u8],
23253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23254        let avail_len = __input.len();
23255        let mut payload_buf = [0; Self::ENCODED_LEN];
23256        let mut buf = if avail_len < Self::ENCODED_LEN {
23257            payload_buf[0..avail_len].copy_from_slice(__input);
23258            Bytes::new(&payload_buf)
23259        } else {
23260            Bytes::new(__input)
23261        };
23262        let mut __struct = Self::default();
23263        __struct.time_usec = buf.get_u64_le();
23264        __struct.integration_time_us = buf.get_u32_le();
23265        __struct.integrated_x = buf.get_f32_le();
23266        __struct.integrated_y = buf.get_f32_le();
23267        __struct.integrated_xgyro = buf.get_f32_le();
23268        __struct.integrated_ygyro = buf.get_f32_le();
23269        __struct.integrated_zgyro = buf.get_f32_le();
23270        __struct.time_delta_distance_us = buf.get_u32_le();
23271        __struct.distance = buf.get_f32_le();
23272        __struct.temperature = buf.get_i16_le();
23273        __struct.sensor_id = buf.get_u8();
23274        __struct.quality = buf.get_u8();
23275        Ok(__struct)
23276    }
23277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23278        let mut __tmp = BytesMut::new(bytes);
23279        #[allow(clippy::absurd_extreme_comparisons)]
23280        #[allow(unused_comparisons)]
23281        if __tmp.remaining() < Self::ENCODED_LEN {
23282            panic!(
23283                "buffer is too small (need {} bytes, but got {})",
23284                Self::ENCODED_LEN,
23285                __tmp.remaining(),
23286            )
23287        }
23288        __tmp.put_u64_le(self.time_usec);
23289        __tmp.put_u32_le(self.integration_time_us);
23290        __tmp.put_f32_le(self.integrated_x);
23291        __tmp.put_f32_le(self.integrated_y);
23292        __tmp.put_f32_le(self.integrated_xgyro);
23293        __tmp.put_f32_le(self.integrated_ygyro);
23294        __tmp.put_f32_le(self.integrated_zgyro);
23295        __tmp.put_u32_le(self.time_delta_distance_us);
23296        __tmp.put_f32_le(self.distance);
23297        __tmp.put_i16_le(self.temperature);
23298        __tmp.put_u8(self.sensor_id);
23299        __tmp.put_u8(self.quality);
23300        if matches!(version, MavlinkVersion::V2) {
23301            let len = __tmp.len();
23302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23303        } else {
23304            __tmp.len()
23305        }
23306    }
23307}
23308#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23309#[doc = ""]
23310#[doc = "ID: 360"]
23311#[derive(Debug, Clone, PartialEq)]
23312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23314#[cfg_attr(feature = "ts", derive(TS))]
23315#[cfg_attr(feature = "ts", ts(export))]
23316pub struct ORBIT_EXECUTION_STATUS_DATA {
23317    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23318    pub time_usec: u64,
23319    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23320    pub radius: f32,
23321    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23322    pub x: i32,
23323    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23324    pub y: i32,
23325    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23326    pub z: f32,
23327    #[doc = "The coordinate system of the fields: x, y, z."]
23328    pub frame: MavFrame,
23329}
23330impl ORBIT_EXECUTION_STATUS_DATA {
23331    pub const ENCODED_LEN: usize = 25usize;
23332    pub const DEFAULT: Self = Self {
23333        time_usec: 0_u64,
23334        radius: 0.0_f32,
23335        x: 0_i32,
23336        y: 0_i32,
23337        z: 0.0_f32,
23338        frame: MavFrame::DEFAULT,
23339    };
23340    #[cfg(feature = "arbitrary")]
23341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23342        use arbitrary::{Arbitrary, Unstructured};
23343        let mut buf = [0u8; 1024];
23344        rng.fill_bytes(&mut buf);
23345        let mut unstructured = Unstructured::new(&buf);
23346        Self::arbitrary(&mut unstructured).unwrap_or_default()
23347    }
23348}
23349impl Default for ORBIT_EXECUTION_STATUS_DATA {
23350    fn default() -> Self {
23351        Self::DEFAULT.clone()
23352    }
23353}
23354impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23355    type Message = MavMessage;
23356    const ID: u32 = 360u32;
23357    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23358    const EXTRA_CRC: u8 = 11u8;
23359    const ENCODED_LEN: usize = 25usize;
23360    fn deser(
23361        _version: MavlinkVersion,
23362        __input: &[u8],
23363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23364        let avail_len = __input.len();
23365        let mut payload_buf = [0; Self::ENCODED_LEN];
23366        let mut buf = if avail_len < Self::ENCODED_LEN {
23367            payload_buf[0..avail_len].copy_from_slice(__input);
23368            Bytes::new(&payload_buf)
23369        } else {
23370            Bytes::new(__input)
23371        };
23372        let mut __struct = Self::default();
23373        __struct.time_usec = buf.get_u64_le();
23374        __struct.radius = buf.get_f32_le();
23375        __struct.x = buf.get_i32_le();
23376        __struct.y = buf.get_i32_le();
23377        __struct.z = buf.get_f32_le();
23378        let tmp = buf.get_u8();
23379        __struct.frame =
23380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23381                enum_type: "MavFrame",
23382                value: tmp as u64,
23383            })?;
23384        Ok(__struct)
23385    }
23386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23387        let mut __tmp = BytesMut::new(bytes);
23388        #[allow(clippy::absurd_extreme_comparisons)]
23389        #[allow(unused_comparisons)]
23390        if __tmp.remaining() < Self::ENCODED_LEN {
23391            panic!(
23392                "buffer is too small (need {} bytes, but got {})",
23393                Self::ENCODED_LEN,
23394                __tmp.remaining(),
23395            )
23396        }
23397        __tmp.put_u64_le(self.time_usec);
23398        __tmp.put_f32_le(self.radius);
23399        __tmp.put_i32_le(self.x);
23400        __tmp.put_i32_le(self.y);
23401        __tmp.put_f32_le(self.z);
23402        __tmp.put_u8(self.frame as u8);
23403        if matches!(version, MavlinkVersion::V2) {
23404            let len = __tmp.len();
23405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23406        } else {
23407            __tmp.len()
23408        }
23409    }
23410}
23411#[doc = "Response from a PARAM_EXT_SET message."]
23412#[doc = ""]
23413#[doc = "ID: 324"]
23414#[derive(Debug, Clone, PartialEq)]
23415#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23417#[cfg_attr(feature = "ts", derive(TS))]
23418#[cfg_attr(feature = "ts", ts(export))]
23419pub struct PARAM_EXT_ACK_DATA {
23420    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23421    #[cfg_attr(feature = "ts", ts(type = "string"))]
23422    pub param_id: CharArray<16>,
23423    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23424    #[cfg_attr(feature = "ts", ts(type = "string"))]
23425    pub param_value: CharArray<128>,
23426    #[doc = "Parameter type."]
23427    pub param_type: MavParamExtType,
23428    #[doc = "Result code."]
23429    pub param_result: ParamAck,
23430}
23431impl PARAM_EXT_ACK_DATA {
23432    pub const ENCODED_LEN: usize = 146usize;
23433    pub const DEFAULT: Self = Self {
23434        param_id: CharArray::new([0_u8; 16usize]),
23435        param_value: CharArray::new([0_u8; 128usize]),
23436        param_type: MavParamExtType::DEFAULT,
23437        param_result: ParamAck::DEFAULT,
23438    };
23439    #[cfg(feature = "arbitrary")]
23440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23441        use arbitrary::{Arbitrary, Unstructured};
23442        let mut buf = [0u8; 1024];
23443        rng.fill_bytes(&mut buf);
23444        let mut unstructured = Unstructured::new(&buf);
23445        Self::arbitrary(&mut unstructured).unwrap_or_default()
23446    }
23447}
23448impl Default for PARAM_EXT_ACK_DATA {
23449    fn default() -> Self {
23450        Self::DEFAULT.clone()
23451    }
23452}
23453impl MessageData for PARAM_EXT_ACK_DATA {
23454    type Message = MavMessage;
23455    const ID: u32 = 324u32;
23456    const NAME: &'static str = "PARAM_EXT_ACK";
23457    const EXTRA_CRC: u8 = 132u8;
23458    const ENCODED_LEN: usize = 146usize;
23459    fn deser(
23460        _version: MavlinkVersion,
23461        __input: &[u8],
23462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23463        let avail_len = __input.len();
23464        let mut payload_buf = [0; Self::ENCODED_LEN];
23465        let mut buf = if avail_len < Self::ENCODED_LEN {
23466            payload_buf[0..avail_len].copy_from_slice(__input);
23467            Bytes::new(&payload_buf)
23468        } else {
23469            Bytes::new(__input)
23470        };
23471        let mut __struct = Self::default();
23472        let mut tmp = [0_u8; 16usize];
23473        for v in &mut tmp {
23474            *v = buf.get_u8();
23475        }
23476        __struct.param_id = CharArray::new(tmp);
23477        let mut tmp = [0_u8; 128usize];
23478        for v in &mut tmp {
23479            *v = buf.get_u8();
23480        }
23481        __struct.param_value = CharArray::new(tmp);
23482        let tmp = buf.get_u8();
23483        __struct.param_type =
23484            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23485                enum_type: "MavParamExtType",
23486                value: tmp as u64,
23487            })?;
23488        let tmp = buf.get_u8();
23489        __struct.param_result =
23490            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23491                enum_type: "ParamAck",
23492                value: tmp as u64,
23493            })?;
23494        Ok(__struct)
23495    }
23496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23497        let mut __tmp = BytesMut::new(bytes);
23498        #[allow(clippy::absurd_extreme_comparisons)]
23499        #[allow(unused_comparisons)]
23500        if __tmp.remaining() < Self::ENCODED_LEN {
23501            panic!(
23502                "buffer is too small (need {} bytes, but got {})",
23503                Self::ENCODED_LEN,
23504                __tmp.remaining(),
23505            )
23506        }
23507        for val in &self.param_id {
23508            __tmp.put_u8(*val);
23509        }
23510        for val in &self.param_value {
23511            __tmp.put_u8(*val);
23512        }
23513        __tmp.put_u8(self.param_type as u8);
23514        __tmp.put_u8(self.param_result as u8);
23515        if matches!(version, MavlinkVersion::V2) {
23516            let len = __tmp.len();
23517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23518        } else {
23519            __tmp.len()
23520        }
23521    }
23522}
23523#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23524#[doc = ""]
23525#[doc = "ID: 321"]
23526#[derive(Debug, Clone, PartialEq)]
23527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23529#[cfg_attr(feature = "ts", derive(TS))]
23530#[cfg_attr(feature = "ts", ts(export))]
23531pub struct PARAM_EXT_REQUEST_LIST_DATA {
23532    #[doc = "System ID"]
23533    pub target_system: u8,
23534    #[doc = "Component ID"]
23535    pub target_component: u8,
23536}
23537impl PARAM_EXT_REQUEST_LIST_DATA {
23538    pub const ENCODED_LEN: usize = 2usize;
23539    pub const DEFAULT: Self = Self {
23540        target_system: 0_u8,
23541        target_component: 0_u8,
23542    };
23543    #[cfg(feature = "arbitrary")]
23544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23545        use arbitrary::{Arbitrary, Unstructured};
23546        let mut buf = [0u8; 1024];
23547        rng.fill_bytes(&mut buf);
23548        let mut unstructured = Unstructured::new(&buf);
23549        Self::arbitrary(&mut unstructured).unwrap_or_default()
23550    }
23551}
23552impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23553    fn default() -> Self {
23554        Self::DEFAULT.clone()
23555    }
23556}
23557impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23558    type Message = MavMessage;
23559    const ID: u32 = 321u32;
23560    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23561    const EXTRA_CRC: u8 = 88u8;
23562    const ENCODED_LEN: usize = 2usize;
23563    fn deser(
23564        _version: MavlinkVersion,
23565        __input: &[u8],
23566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23567        let avail_len = __input.len();
23568        let mut payload_buf = [0; Self::ENCODED_LEN];
23569        let mut buf = if avail_len < Self::ENCODED_LEN {
23570            payload_buf[0..avail_len].copy_from_slice(__input);
23571            Bytes::new(&payload_buf)
23572        } else {
23573            Bytes::new(__input)
23574        };
23575        let mut __struct = Self::default();
23576        __struct.target_system = buf.get_u8();
23577        __struct.target_component = buf.get_u8();
23578        Ok(__struct)
23579    }
23580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23581        let mut __tmp = BytesMut::new(bytes);
23582        #[allow(clippy::absurd_extreme_comparisons)]
23583        #[allow(unused_comparisons)]
23584        if __tmp.remaining() < Self::ENCODED_LEN {
23585            panic!(
23586                "buffer is too small (need {} bytes, but got {})",
23587                Self::ENCODED_LEN,
23588                __tmp.remaining(),
23589            )
23590        }
23591        __tmp.put_u8(self.target_system);
23592        __tmp.put_u8(self.target_component);
23593        if matches!(version, MavlinkVersion::V2) {
23594            let len = __tmp.len();
23595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23596        } else {
23597            __tmp.len()
23598        }
23599    }
23600}
23601#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23602#[doc = ""]
23603#[doc = "ID: 320"]
23604#[derive(Debug, Clone, PartialEq)]
23605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23607#[cfg_attr(feature = "ts", derive(TS))]
23608#[cfg_attr(feature = "ts", ts(export))]
23609pub struct PARAM_EXT_REQUEST_READ_DATA {
23610    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23611    pub param_index: i16,
23612    #[doc = "System ID"]
23613    pub target_system: u8,
23614    #[doc = "Component ID"]
23615    pub target_component: u8,
23616    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23617    #[cfg_attr(feature = "ts", ts(type = "string"))]
23618    pub param_id: CharArray<16>,
23619}
23620impl PARAM_EXT_REQUEST_READ_DATA {
23621    pub const ENCODED_LEN: usize = 20usize;
23622    pub const DEFAULT: Self = Self {
23623        param_index: 0_i16,
23624        target_system: 0_u8,
23625        target_component: 0_u8,
23626        param_id: CharArray::new([0_u8; 16usize]),
23627    };
23628    #[cfg(feature = "arbitrary")]
23629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23630        use arbitrary::{Arbitrary, Unstructured};
23631        let mut buf = [0u8; 1024];
23632        rng.fill_bytes(&mut buf);
23633        let mut unstructured = Unstructured::new(&buf);
23634        Self::arbitrary(&mut unstructured).unwrap_or_default()
23635    }
23636}
23637impl Default for PARAM_EXT_REQUEST_READ_DATA {
23638    fn default() -> Self {
23639        Self::DEFAULT.clone()
23640    }
23641}
23642impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23643    type Message = MavMessage;
23644    const ID: u32 = 320u32;
23645    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23646    const EXTRA_CRC: u8 = 243u8;
23647    const ENCODED_LEN: usize = 20usize;
23648    fn deser(
23649        _version: MavlinkVersion,
23650        __input: &[u8],
23651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23652        let avail_len = __input.len();
23653        let mut payload_buf = [0; Self::ENCODED_LEN];
23654        let mut buf = if avail_len < Self::ENCODED_LEN {
23655            payload_buf[0..avail_len].copy_from_slice(__input);
23656            Bytes::new(&payload_buf)
23657        } else {
23658            Bytes::new(__input)
23659        };
23660        let mut __struct = Self::default();
23661        __struct.param_index = buf.get_i16_le();
23662        __struct.target_system = buf.get_u8();
23663        __struct.target_component = buf.get_u8();
23664        let mut tmp = [0_u8; 16usize];
23665        for v in &mut tmp {
23666            *v = buf.get_u8();
23667        }
23668        __struct.param_id = CharArray::new(tmp);
23669        Ok(__struct)
23670    }
23671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23672        let mut __tmp = BytesMut::new(bytes);
23673        #[allow(clippy::absurd_extreme_comparisons)]
23674        #[allow(unused_comparisons)]
23675        if __tmp.remaining() < Self::ENCODED_LEN {
23676            panic!(
23677                "buffer is too small (need {} bytes, but got {})",
23678                Self::ENCODED_LEN,
23679                __tmp.remaining(),
23680            )
23681        }
23682        __tmp.put_i16_le(self.param_index);
23683        __tmp.put_u8(self.target_system);
23684        __tmp.put_u8(self.target_component);
23685        for val in &self.param_id {
23686            __tmp.put_u8(*val);
23687        }
23688        if matches!(version, MavlinkVersion::V2) {
23689            let len = __tmp.len();
23690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23691        } else {
23692            __tmp.len()
23693        }
23694    }
23695}
23696#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23697#[doc = ""]
23698#[doc = "ID: 323"]
23699#[derive(Debug, Clone, PartialEq)]
23700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23702#[cfg_attr(feature = "ts", derive(TS))]
23703#[cfg_attr(feature = "ts", ts(export))]
23704pub struct PARAM_EXT_SET_DATA {
23705    #[doc = "System ID"]
23706    pub target_system: u8,
23707    #[doc = "Component ID"]
23708    pub target_component: u8,
23709    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23710    #[cfg_attr(feature = "ts", ts(type = "string"))]
23711    pub param_id: CharArray<16>,
23712    #[doc = "Parameter value"]
23713    #[cfg_attr(feature = "ts", ts(type = "string"))]
23714    pub param_value: CharArray<128>,
23715    #[doc = "Parameter type."]
23716    pub param_type: MavParamExtType,
23717}
23718impl PARAM_EXT_SET_DATA {
23719    pub const ENCODED_LEN: usize = 147usize;
23720    pub const DEFAULT: Self = Self {
23721        target_system: 0_u8,
23722        target_component: 0_u8,
23723        param_id: CharArray::new([0_u8; 16usize]),
23724        param_value: CharArray::new([0_u8; 128usize]),
23725        param_type: MavParamExtType::DEFAULT,
23726    };
23727    #[cfg(feature = "arbitrary")]
23728    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23729        use arbitrary::{Arbitrary, Unstructured};
23730        let mut buf = [0u8; 1024];
23731        rng.fill_bytes(&mut buf);
23732        let mut unstructured = Unstructured::new(&buf);
23733        Self::arbitrary(&mut unstructured).unwrap_or_default()
23734    }
23735}
23736impl Default for PARAM_EXT_SET_DATA {
23737    fn default() -> Self {
23738        Self::DEFAULT.clone()
23739    }
23740}
23741impl MessageData for PARAM_EXT_SET_DATA {
23742    type Message = MavMessage;
23743    const ID: u32 = 323u32;
23744    const NAME: &'static str = "PARAM_EXT_SET";
23745    const EXTRA_CRC: u8 = 78u8;
23746    const ENCODED_LEN: usize = 147usize;
23747    fn deser(
23748        _version: MavlinkVersion,
23749        __input: &[u8],
23750    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23751        let avail_len = __input.len();
23752        let mut payload_buf = [0; Self::ENCODED_LEN];
23753        let mut buf = if avail_len < Self::ENCODED_LEN {
23754            payload_buf[0..avail_len].copy_from_slice(__input);
23755            Bytes::new(&payload_buf)
23756        } else {
23757            Bytes::new(__input)
23758        };
23759        let mut __struct = Self::default();
23760        __struct.target_system = buf.get_u8();
23761        __struct.target_component = buf.get_u8();
23762        let mut tmp = [0_u8; 16usize];
23763        for v in &mut tmp {
23764            *v = buf.get_u8();
23765        }
23766        __struct.param_id = CharArray::new(tmp);
23767        let mut tmp = [0_u8; 128usize];
23768        for v in &mut tmp {
23769            *v = buf.get_u8();
23770        }
23771        __struct.param_value = CharArray::new(tmp);
23772        let tmp = buf.get_u8();
23773        __struct.param_type =
23774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23775                enum_type: "MavParamExtType",
23776                value: tmp as u64,
23777            })?;
23778        Ok(__struct)
23779    }
23780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23781        let mut __tmp = BytesMut::new(bytes);
23782        #[allow(clippy::absurd_extreme_comparisons)]
23783        #[allow(unused_comparisons)]
23784        if __tmp.remaining() < Self::ENCODED_LEN {
23785            panic!(
23786                "buffer is too small (need {} bytes, but got {})",
23787                Self::ENCODED_LEN,
23788                __tmp.remaining(),
23789            )
23790        }
23791        __tmp.put_u8(self.target_system);
23792        __tmp.put_u8(self.target_component);
23793        for val in &self.param_id {
23794            __tmp.put_u8(*val);
23795        }
23796        for val in &self.param_value {
23797            __tmp.put_u8(*val);
23798        }
23799        __tmp.put_u8(self.param_type as u8);
23800        if matches!(version, MavlinkVersion::V2) {
23801            let len = __tmp.len();
23802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23803        } else {
23804            __tmp.len()
23805        }
23806    }
23807}
23808#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23809#[doc = ""]
23810#[doc = "ID: 322"]
23811#[derive(Debug, Clone, PartialEq)]
23812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23814#[cfg_attr(feature = "ts", derive(TS))]
23815#[cfg_attr(feature = "ts", ts(export))]
23816pub struct PARAM_EXT_VALUE_DATA {
23817    #[doc = "Total number of parameters"]
23818    pub param_count: u16,
23819    #[doc = "Index of this parameter"]
23820    pub param_index: u16,
23821    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23822    #[cfg_attr(feature = "ts", ts(type = "string"))]
23823    pub param_id: CharArray<16>,
23824    #[doc = "Parameter value"]
23825    #[cfg_attr(feature = "ts", ts(type = "string"))]
23826    pub param_value: CharArray<128>,
23827    #[doc = "Parameter type."]
23828    pub param_type: MavParamExtType,
23829}
23830impl PARAM_EXT_VALUE_DATA {
23831    pub const ENCODED_LEN: usize = 149usize;
23832    pub const DEFAULT: Self = Self {
23833        param_count: 0_u16,
23834        param_index: 0_u16,
23835        param_id: CharArray::new([0_u8; 16usize]),
23836        param_value: CharArray::new([0_u8; 128usize]),
23837        param_type: MavParamExtType::DEFAULT,
23838    };
23839    #[cfg(feature = "arbitrary")]
23840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23841        use arbitrary::{Arbitrary, Unstructured};
23842        let mut buf = [0u8; 1024];
23843        rng.fill_bytes(&mut buf);
23844        let mut unstructured = Unstructured::new(&buf);
23845        Self::arbitrary(&mut unstructured).unwrap_or_default()
23846    }
23847}
23848impl Default for PARAM_EXT_VALUE_DATA {
23849    fn default() -> Self {
23850        Self::DEFAULT.clone()
23851    }
23852}
23853impl MessageData for PARAM_EXT_VALUE_DATA {
23854    type Message = MavMessage;
23855    const ID: u32 = 322u32;
23856    const NAME: &'static str = "PARAM_EXT_VALUE";
23857    const EXTRA_CRC: u8 = 243u8;
23858    const ENCODED_LEN: usize = 149usize;
23859    fn deser(
23860        _version: MavlinkVersion,
23861        __input: &[u8],
23862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23863        let avail_len = __input.len();
23864        let mut payload_buf = [0; Self::ENCODED_LEN];
23865        let mut buf = if avail_len < Self::ENCODED_LEN {
23866            payload_buf[0..avail_len].copy_from_slice(__input);
23867            Bytes::new(&payload_buf)
23868        } else {
23869            Bytes::new(__input)
23870        };
23871        let mut __struct = Self::default();
23872        __struct.param_count = buf.get_u16_le();
23873        __struct.param_index = buf.get_u16_le();
23874        let mut tmp = [0_u8; 16usize];
23875        for v in &mut tmp {
23876            *v = buf.get_u8();
23877        }
23878        __struct.param_id = CharArray::new(tmp);
23879        let mut tmp = [0_u8; 128usize];
23880        for v in &mut tmp {
23881            *v = buf.get_u8();
23882        }
23883        __struct.param_value = CharArray::new(tmp);
23884        let tmp = buf.get_u8();
23885        __struct.param_type =
23886            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23887                enum_type: "MavParamExtType",
23888                value: tmp as u64,
23889            })?;
23890        Ok(__struct)
23891    }
23892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23893        let mut __tmp = BytesMut::new(bytes);
23894        #[allow(clippy::absurd_extreme_comparisons)]
23895        #[allow(unused_comparisons)]
23896        if __tmp.remaining() < Self::ENCODED_LEN {
23897            panic!(
23898                "buffer is too small (need {} bytes, but got {})",
23899                Self::ENCODED_LEN,
23900                __tmp.remaining(),
23901            )
23902        }
23903        __tmp.put_u16_le(self.param_count);
23904        __tmp.put_u16_le(self.param_index);
23905        for val in &self.param_id {
23906            __tmp.put_u8(*val);
23907        }
23908        for val in &self.param_value {
23909            __tmp.put_u8(*val);
23910        }
23911        __tmp.put_u8(self.param_type as u8);
23912        if matches!(version, MavlinkVersion::V2) {
23913            let len = __tmp.len();
23914            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23915        } else {
23916            __tmp.len()
23917        }
23918    }
23919}
23920#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23921#[doc = ""]
23922#[doc = "ID: 50"]
23923#[derive(Debug, Clone, PartialEq)]
23924#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23925#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23926#[cfg_attr(feature = "ts", derive(TS))]
23927#[cfg_attr(feature = "ts", ts(export))]
23928pub struct PARAM_MAP_RC_DATA {
23929    #[doc = "Initial parameter value"]
23930    pub param_value0: f32,
23931    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23932    pub scale: f32,
23933    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23934    pub param_value_min: f32,
23935    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23936    pub param_value_max: f32,
23937    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23938    pub param_index: i16,
23939    #[doc = "System ID"]
23940    pub target_system: u8,
23941    #[doc = "Component ID"]
23942    pub target_component: u8,
23943    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23944    #[cfg_attr(feature = "ts", ts(type = "string"))]
23945    pub param_id: CharArray<16>,
23946    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23947    pub parameter_rc_channel_index: u8,
23948}
23949impl PARAM_MAP_RC_DATA {
23950    pub const ENCODED_LEN: usize = 37usize;
23951    pub const DEFAULT: Self = Self {
23952        param_value0: 0.0_f32,
23953        scale: 0.0_f32,
23954        param_value_min: 0.0_f32,
23955        param_value_max: 0.0_f32,
23956        param_index: 0_i16,
23957        target_system: 0_u8,
23958        target_component: 0_u8,
23959        param_id: CharArray::new([0_u8; 16usize]),
23960        parameter_rc_channel_index: 0_u8,
23961    };
23962    #[cfg(feature = "arbitrary")]
23963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23964        use arbitrary::{Arbitrary, Unstructured};
23965        let mut buf = [0u8; 1024];
23966        rng.fill_bytes(&mut buf);
23967        let mut unstructured = Unstructured::new(&buf);
23968        Self::arbitrary(&mut unstructured).unwrap_or_default()
23969    }
23970}
23971impl Default for PARAM_MAP_RC_DATA {
23972    fn default() -> Self {
23973        Self::DEFAULT.clone()
23974    }
23975}
23976impl MessageData for PARAM_MAP_RC_DATA {
23977    type Message = MavMessage;
23978    const ID: u32 = 50u32;
23979    const NAME: &'static str = "PARAM_MAP_RC";
23980    const EXTRA_CRC: u8 = 78u8;
23981    const ENCODED_LEN: usize = 37usize;
23982    fn deser(
23983        _version: MavlinkVersion,
23984        __input: &[u8],
23985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23986        let avail_len = __input.len();
23987        let mut payload_buf = [0; Self::ENCODED_LEN];
23988        let mut buf = if avail_len < Self::ENCODED_LEN {
23989            payload_buf[0..avail_len].copy_from_slice(__input);
23990            Bytes::new(&payload_buf)
23991        } else {
23992            Bytes::new(__input)
23993        };
23994        let mut __struct = Self::default();
23995        __struct.param_value0 = buf.get_f32_le();
23996        __struct.scale = buf.get_f32_le();
23997        __struct.param_value_min = buf.get_f32_le();
23998        __struct.param_value_max = buf.get_f32_le();
23999        __struct.param_index = buf.get_i16_le();
24000        __struct.target_system = buf.get_u8();
24001        __struct.target_component = buf.get_u8();
24002        let mut tmp = [0_u8; 16usize];
24003        for v in &mut tmp {
24004            *v = buf.get_u8();
24005        }
24006        __struct.param_id = CharArray::new(tmp);
24007        __struct.parameter_rc_channel_index = buf.get_u8();
24008        Ok(__struct)
24009    }
24010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24011        let mut __tmp = BytesMut::new(bytes);
24012        #[allow(clippy::absurd_extreme_comparisons)]
24013        #[allow(unused_comparisons)]
24014        if __tmp.remaining() < Self::ENCODED_LEN {
24015            panic!(
24016                "buffer is too small (need {} bytes, but got {})",
24017                Self::ENCODED_LEN,
24018                __tmp.remaining(),
24019            )
24020        }
24021        __tmp.put_f32_le(self.param_value0);
24022        __tmp.put_f32_le(self.scale);
24023        __tmp.put_f32_le(self.param_value_min);
24024        __tmp.put_f32_le(self.param_value_max);
24025        __tmp.put_i16_le(self.param_index);
24026        __tmp.put_u8(self.target_system);
24027        __tmp.put_u8(self.target_component);
24028        for val in &self.param_id {
24029            __tmp.put_u8(*val);
24030        }
24031        __tmp.put_u8(self.parameter_rc_channel_index);
24032        if matches!(version, MavlinkVersion::V2) {
24033            let len = __tmp.len();
24034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24035        } else {
24036            __tmp.len()
24037        }
24038    }
24039}
24040#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24041#[doc = ""]
24042#[doc = "ID: 21"]
24043#[derive(Debug, Clone, PartialEq)]
24044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24046#[cfg_attr(feature = "ts", derive(TS))]
24047#[cfg_attr(feature = "ts", ts(export))]
24048pub struct PARAM_REQUEST_LIST_DATA {
24049    #[doc = "System ID"]
24050    pub target_system: u8,
24051    #[doc = "Component ID"]
24052    pub target_component: u8,
24053}
24054impl PARAM_REQUEST_LIST_DATA {
24055    pub const ENCODED_LEN: usize = 2usize;
24056    pub const DEFAULT: Self = Self {
24057        target_system: 0_u8,
24058        target_component: 0_u8,
24059    };
24060    #[cfg(feature = "arbitrary")]
24061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24062        use arbitrary::{Arbitrary, Unstructured};
24063        let mut buf = [0u8; 1024];
24064        rng.fill_bytes(&mut buf);
24065        let mut unstructured = Unstructured::new(&buf);
24066        Self::arbitrary(&mut unstructured).unwrap_or_default()
24067    }
24068}
24069impl Default for PARAM_REQUEST_LIST_DATA {
24070    fn default() -> Self {
24071        Self::DEFAULT.clone()
24072    }
24073}
24074impl MessageData for PARAM_REQUEST_LIST_DATA {
24075    type Message = MavMessage;
24076    const ID: u32 = 21u32;
24077    const NAME: &'static str = "PARAM_REQUEST_LIST";
24078    const EXTRA_CRC: u8 = 159u8;
24079    const ENCODED_LEN: usize = 2usize;
24080    fn deser(
24081        _version: MavlinkVersion,
24082        __input: &[u8],
24083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24084        let avail_len = __input.len();
24085        let mut payload_buf = [0; Self::ENCODED_LEN];
24086        let mut buf = if avail_len < Self::ENCODED_LEN {
24087            payload_buf[0..avail_len].copy_from_slice(__input);
24088            Bytes::new(&payload_buf)
24089        } else {
24090            Bytes::new(__input)
24091        };
24092        let mut __struct = Self::default();
24093        __struct.target_system = buf.get_u8();
24094        __struct.target_component = buf.get_u8();
24095        Ok(__struct)
24096    }
24097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24098        let mut __tmp = BytesMut::new(bytes);
24099        #[allow(clippy::absurd_extreme_comparisons)]
24100        #[allow(unused_comparisons)]
24101        if __tmp.remaining() < Self::ENCODED_LEN {
24102            panic!(
24103                "buffer is too small (need {} bytes, but got {})",
24104                Self::ENCODED_LEN,
24105                __tmp.remaining(),
24106            )
24107        }
24108        __tmp.put_u8(self.target_system);
24109        __tmp.put_u8(self.target_component);
24110        if matches!(version, MavlinkVersion::V2) {
24111            let len = __tmp.len();
24112            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24113        } else {
24114            __tmp.len()
24115        }
24116    }
24117}
24118#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24119#[doc = ""]
24120#[doc = "ID: 20"]
24121#[derive(Debug, Clone, PartialEq)]
24122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24124#[cfg_attr(feature = "ts", derive(TS))]
24125#[cfg_attr(feature = "ts", ts(export))]
24126pub struct PARAM_REQUEST_READ_DATA {
24127    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24128    pub param_index: i16,
24129    #[doc = "System ID"]
24130    pub target_system: u8,
24131    #[doc = "Component ID"]
24132    pub target_component: u8,
24133    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24134    #[cfg_attr(feature = "ts", ts(type = "string"))]
24135    pub param_id: CharArray<16>,
24136}
24137impl PARAM_REQUEST_READ_DATA {
24138    pub const ENCODED_LEN: usize = 20usize;
24139    pub const DEFAULT: Self = Self {
24140        param_index: 0_i16,
24141        target_system: 0_u8,
24142        target_component: 0_u8,
24143        param_id: CharArray::new([0_u8; 16usize]),
24144    };
24145    #[cfg(feature = "arbitrary")]
24146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24147        use arbitrary::{Arbitrary, Unstructured};
24148        let mut buf = [0u8; 1024];
24149        rng.fill_bytes(&mut buf);
24150        let mut unstructured = Unstructured::new(&buf);
24151        Self::arbitrary(&mut unstructured).unwrap_or_default()
24152    }
24153}
24154impl Default for PARAM_REQUEST_READ_DATA {
24155    fn default() -> Self {
24156        Self::DEFAULT.clone()
24157    }
24158}
24159impl MessageData for PARAM_REQUEST_READ_DATA {
24160    type Message = MavMessage;
24161    const ID: u32 = 20u32;
24162    const NAME: &'static str = "PARAM_REQUEST_READ";
24163    const EXTRA_CRC: u8 = 214u8;
24164    const ENCODED_LEN: usize = 20usize;
24165    fn deser(
24166        _version: MavlinkVersion,
24167        __input: &[u8],
24168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24169        let avail_len = __input.len();
24170        let mut payload_buf = [0; Self::ENCODED_LEN];
24171        let mut buf = if avail_len < Self::ENCODED_LEN {
24172            payload_buf[0..avail_len].copy_from_slice(__input);
24173            Bytes::new(&payload_buf)
24174        } else {
24175            Bytes::new(__input)
24176        };
24177        let mut __struct = Self::default();
24178        __struct.param_index = buf.get_i16_le();
24179        __struct.target_system = buf.get_u8();
24180        __struct.target_component = buf.get_u8();
24181        let mut tmp = [0_u8; 16usize];
24182        for v in &mut tmp {
24183            *v = buf.get_u8();
24184        }
24185        __struct.param_id = CharArray::new(tmp);
24186        Ok(__struct)
24187    }
24188    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24189        let mut __tmp = BytesMut::new(bytes);
24190        #[allow(clippy::absurd_extreme_comparisons)]
24191        #[allow(unused_comparisons)]
24192        if __tmp.remaining() < Self::ENCODED_LEN {
24193            panic!(
24194                "buffer is too small (need {} bytes, but got {})",
24195                Self::ENCODED_LEN,
24196                __tmp.remaining(),
24197            )
24198        }
24199        __tmp.put_i16_le(self.param_index);
24200        __tmp.put_u8(self.target_system);
24201        __tmp.put_u8(self.target_component);
24202        for val in &self.param_id {
24203            __tmp.put_u8(*val);
24204        }
24205        if matches!(version, MavlinkVersion::V2) {
24206            let len = __tmp.len();
24207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24208        } else {
24209            __tmp.len()
24210        }
24211    }
24212}
24213#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24214#[doc = ""]
24215#[doc = "ID: 23"]
24216#[derive(Debug, Clone, PartialEq)]
24217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24219#[cfg_attr(feature = "ts", derive(TS))]
24220#[cfg_attr(feature = "ts", ts(export))]
24221pub struct PARAM_SET_DATA {
24222    #[doc = "Onboard parameter value"]
24223    pub param_value: f32,
24224    #[doc = "System ID"]
24225    pub target_system: u8,
24226    #[doc = "Component ID"]
24227    pub target_component: u8,
24228    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24229    #[cfg_attr(feature = "ts", ts(type = "string"))]
24230    pub param_id: CharArray<16>,
24231    #[doc = "Onboard parameter type."]
24232    pub param_type: MavParamType,
24233}
24234impl PARAM_SET_DATA {
24235    pub const ENCODED_LEN: usize = 23usize;
24236    pub const DEFAULT: Self = Self {
24237        param_value: 0.0_f32,
24238        target_system: 0_u8,
24239        target_component: 0_u8,
24240        param_id: CharArray::new([0_u8; 16usize]),
24241        param_type: MavParamType::DEFAULT,
24242    };
24243    #[cfg(feature = "arbitrary")]
24244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24245        use arbitrary::{Arbitrary, Unstructured};
24246        let mut buf = [0u8; 1024];
24247        rng.fill_bytes(&mut buf);
24248        let mut unstructured = Unstructured::new(&buf);
24249        Self::arbitrary(&mut unstructured).unwrap_or_default()
24250    }
24251}
24252impl Default for PARAM_SET_DATA {
24253    fn default() -> Self {
24254        Self::DEFAULT.clone()
24255    }
24256}
24257impl MessageData for PARAM_SET_DATA {
24258    type Message = MavMessage;
24259    const ID: u32 = 23u32;
24260    const NAME: &'static str = "PARAM_SET";
24261    const EXTRA_CRC: u8 = 168u8;
24262    const ENCODED_LEN: usize = 23usize;
24263    fn deser(
24264        _version: MavlinkVersion,
24265        __input: &[u8],
24266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24267        let avail_len = __input.len();
24268        let mut payload_buf = [0; Self::ENCODED_LEN];
24269        let mut buf = if avail_len < Self::ENCODED_LEN {
24270            payload_buf[0..avail_len].copy_from_slice(__input);
24271            Bytes::new(&payload_buf)
24272        } else {
24273            Bytes::new(__input)
24274        };
24275        let mut __struct = Self::default();
24276        __struct.param_value = buf.get_f32_le();
24277        __struct.target_system = buf.get_u8();
24278        __struct.target_component = buf.get_u8();
24279        let mut tmp = [0_u8; 16usize];
24280        for v in &mut tmp {
24281            *v = buf.get_u8();
24282        }
24283        __struct.param_id = CharArray::new(tmp);
24284        let tmp = buf.get_u8();
24285        __struct.param_type =
24286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24287                enum_type: "MavParamType",
24288                value: tmp as u64,
24289            })?;
24290        Ok(__struct)
24291    }
24292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24293        let mut __tmp = BytesMut::new(bytes);
24294        #[allow(clippy::absurd_extreme_comparisons)]
24295        #[allow(unused_comparisons)]
24296        if __tmp.remaining() < Self::ENCODED_LEN {
24297            panic!(
24298                "buffer is too small (need {} bytes, but got {})",
24299                Self::ENCODED_LEN,
24300                __tmp.remaining(),
24301            )
24302        }
24303        __tmp.put_f32_le(self.param_value);
24304        __tmp.put_u8(self.target_system);
24305        __tmp.put_u8(self.target_component);
24306        for val in &self.param_id {
24307            __tmp.put_u8(*val);
24308        }
24309        __tmp.put_u8(self.param_type as u8);
24310        if matches!(version, MavlinkVersion::V2) {
24311            let len = __tmp.len();
24312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24313        } else {
24314            __tmp.len()
24315        }
24316    }
24317}
24318#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24319#[doc = ""]
24320#[doc = "ID: 22"]
24321#[derive(Debug, Clone, PartialEq)]
24322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24323#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24324#[cfg_attr(feature = "ts", derive(TS))]
24325#[cfg_attr(feature = "ts", ts(export))]
24326pub struct PARAM_VALUE_DATA {
24327    #[doc = "Onboard parameter value"]
24328    pub param_value: f32,
24329    #[doc = "Total number of onboard parameters"]
24330    pub param_count: u16,
24331    #[doc = "Index of this onboard parameter"]
24332    pub param_index: u16,
24333    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24334    #[cfg_attr(feature = "ts", ts(type = "string"))]
24335    pub param_id: CharArray<16>,
24336    #[doc = "Onboard parameter type."]
24337    pub param_type: MavParamType,
24338}
24339impl PARAM_VALUE_DATA {
24340    pub const ENCODED_LEN: usize = 25usize;
24341    pub const DEFAULT: Self = Self {
24342        param_value: 0.0_f32,
24343        param_count: 0_u16,
24344        param_index: 0_u16,
24345        param_id: CharArray::new([0_u8; 16usize]),
24346        param_type: MavParamType::DEFAULT,
24347    };
24348    #[cfg(feature = "arbitrary")]
24349    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24350        use arbitrary::{Arbitrary, Unstructured};
24351        let mut buf = [0u8; 1024];
24352        rng.fill_bytes(&mut buf);
24353        let mut unstructured = Unstructured::new(&buf);
24354        Self::arbitrary(&mut unstructured).unwrap_or_default()
24355    }
24356}
24357impl Default for PARAM_VALUE_DATA {
24358    fn default() -> Self {
24359        Self::DEFAULT.clone()
24360    }
24361}
24362impl MessageData for PARAM_VALUE_DATA {
24363    type Message = MavMessage;
24364    const ID: u32 = 22u32;
24365    const NAME: &'static str = "PARAM_VALUE";
24366    const EXTRA_CRC: u8 = 220u8;
24367    const ENCODED_LEN: usize = 25usize;
24368    fn deser(
24369        _version: MavlinkVersion,
24370        __input: &[u8],
24371    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24372        let avail_len = __input.len();
24373        let mut payload_buf = [0; Self::ENCODED_LEN];
24374        let mut buf = if avail_len < Self::ENCODED_LEN {
24375            payload_buf[0..avail_len].copy_from_slice(__input);
24376            Bytes::new(&payload_buf)
24377        } else {
24378            Bytes::new(__input)
24379        };
24380        let mut __struct = Self::default();
24381        __struct.param_value = buf.get_f32_le();
24382        __struct.param_count = buf.get_u16_le();
24383        __struct.param_index = buf.get_u16_le();
24384        let mut tmp = [0_u8; 16usize];
24385        for v in &mut tmp {
24386            *v = buf.get_u8();
24387        }
24388        __struct.param_id = CharArray::new(tmp);
24389        let tmp = buf.get_u8();
24390        __struct.param_type =
24391            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24392                enum_type: "MavParamType",
24393                value: tmp as u64,
24394            })?;
24395        Ok(__struct)
24396    }
24397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24398        let mut __tmp = BytesMut::new(bytes);
24399        #[allow(clippy::absurd_extreme_comparisons)]
24400        #[allow(unused_comparisons)]
24401        if __tmp.remaining() < Self::ENCODED_LEN {
24402            panic!(
24403                "buffer is too small (need {} bytes, but got {})",
24404                Self::ENCODED_LEN,
24405                __tmp.remaining(),
24406            )
24407        }
24408        __tmp.put_f32_le(self.param_value);
24409        __tmp.put_u16_le(self.param_count);
24410        __tmp.put_u16_le(self.param_index);
24411        for val in &self.param_id {
24412            __tmp.put_u8(*val);
24413        }
24414        __tmp.put_u8(self.param_type as u8);
24415        if matches!(version, MavlinkVersion::V2) {
24416            let len = __tmp.len();
24417            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24418        } else {
24419            __tmp.len()
24420        }
24421    }
24422}
24423#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24424#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24425#[doc = ""]
24426#[doc = "ID: 4"]
24427#[derive(Debug, Clone, PartialEq)]
24428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24430#[cfg_attr(feature = "ts", derive(TS))]
24431#[cfg_attr(feature = "ts", ts(export))]
24432pub struct PING_DATA {
24433    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24434    pub time_usec: u64,
24435    #[doc = "PING sequence"]
24436    pub seq: u32,
24437    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24438    pub target_system: u8,
24439    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24440    pub target_component: u8,
24441}
24442impl PING_DATA {
24443    pub const ENCODED_LEN: usize = 14usize;
24444    pub const DEFAULT: Self = Self {
24445        time_usec: 0_u64,
24446        seq: 0_u32,
24447        target_system: 0_u8,
24448        target_component: 0_u8,
24449    };
24450    #[cfg(feature = "arbitrary")]
24451    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24452        use arbitrary::{Arbitrary, Unstructured};
24453        let mut buf = [0u8; 1024];
24454        rng.fill_bytes(&mut buf);
24455        let mut unstructured = Unstructured::new(&buf);
24456        Self::arbitrary(&mut unstructured).unwrap_or_default()
24457    }
24458}
24459impl Default for PING_DATA {
24460    fn default() -> Self {
24461        Self::DEFAULT.clone()
24462    }
24463}
24464impl MessageData for PING_DATA {
24465    type Message = MavMessage;
24466    const ID: u32 = 4u32;
24467    const NAME: &'static str = "PING";
24468    const EXTRA_CRC: u8 = 237u8;
24469    const ENCODED_LEN: usize = 14usize;
24470    fn deser(
24471        _version: MavlinkVersion,
24472        __input: &[u8],
24473    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24474        let avail_len = __input.len();
24475        let mut payload_buf = [0; Self::ENCODED_LEN];
24476        let mut buf = if avail_len < Self::ENCODED_LEN {
24477            payload_buf[0..avail_len].copy_from_slice(__input);
24478            Bytes::new(&payload_buf)
24479        } else {
24480            Bytes::new(__input)
24481        };
24482        let mut __struct = Self::default();
24483        __struct.time_usec = buf.get_u64_le();
24484        __struct.seq = buf.get_u32_le();
24485        __struct.target_system = buf.get_u8();
24486        __struct.target_component = buf.get_u8();
24487        Ok(__struct)
24488    }
24489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24490        let mut __tmp = BytesMut::new(bytes);
24491        #[allow(clippy::absurd_extreme_comparisons)]
24492        #[allow(unused_comparisons)]
24493        if __tmp.remaining() < Self::ENCODED_LEN {
24494            panic!(
24495                "buffer is too small (need {} bytes, but got {})",
24496                Self::ENCODED_LEN,
24497                __tmp.remaining(),
24498            )
24499        }
24500        __tmp.put_u64_le(self.time_usec);
24501        __tmp.put_u32_le(self.seq);
24502        __tmp.put_u8(self.target_system);
24503        __tmp.put_u8(self.target_component);
24504        if matches!(version, MavlinkVersion::V2) {
24505            let len = __tmp.len();
24506            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24507        } else {
24508            __tmp.len()
24509        }
24510    }
24511}
24512#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24513#[doc = "Control vehicle tone generation (buzzer)."]
24514#[doc = ""]
24515#[doc = "ID: 258"]
24516#[derive(Debug, Clone, PartialEq)]
24517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24519#[cfg_attr(feature = "ts", derive(TS))]
24520#[cfg_attr(feature = "ts", ts(export))]
24521pub struct PLAY_TUNE_DATA {
24522    #[doc = "System ID"]
24523    pub target_system: u8,
24524    #[doc = "Component ID"]
24525    pub target_component: u8,
24526    #[doc = "tune in board specific format"]
24527    #[cfg_attr(feature = "ts", ts(type = "string"))]
24528    pub tune: CharArray<30>,
24529    #[doc = "tune extension (appended to tune)"]
24530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24531    #[cfg_attr(feature = "ts", ts(type = "string"))]
24532    pub tune2: CharArray<200>,
24533}
24534impl PLAY_TUNE_DATA {
24535    pub const ENCODED_LEN: usize = 232usize;
24536    pub const DEFAULT: Self = Self {
24537        target_system: 0_u8,
24538        target_component: 0_u8,
24539        tune: CharArray::new([0_u8; 30usize]),
24540        tune2: CharArray::new([0_u8; 200usize]),
24541    };
24542    #[cfg(feature = "arbitrary")]
24543    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24544        use arbitrary::{Arbitrary, Unstructured};
24545        let mut buf = [0u8; 1024];
24546        rng.fill_bytes(&mut buf);
24547        let mut unstructured = Unstructured::new(&buf);
24548        Self::arbitrary(&mut unstructured).unwrap_or_default()
24549    }
24550}
24551impl Default for PLAY_TUNE_DATA {
24552    fn default() -> Self {
24553        Self::DEFAULT.clone()
24554    }
24555}
24556impl MessageData for PLAY_TUNE_DATA {
24557    type Message = MavMessage;
24558    const ID: u32 = 258u32;
24559    const NAME: &'static str = "PLAY_TUNE";
24560    const EXTRA_CRC: u8 = 187u8;
24561    const ENCODED_LEN: usize = 232usize;
24562    fn deser(
24563        _version: MavlinkVersion,
24564        __input: &[u8],
24565    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24566        let avail_len = __input.len();
24567        let mut payload_buf = [0; Self::ENCODED_LEN];
24568        let mut buf = if avail_len < Self::ENCODED_LEN {
24569            payload_buf[0..avail_len].copy_from_slice(__input);
24570            Bytes::new(&payload_buf)
24571        } else {
24572            Bytes::new(__input)
24573        };
24574        let mut __struct = Self::default();
24575        __struct.target_system = buf.get_u8();
24576        __struct.target_component = buf.get_u8();
24577        let mut tmp = [0_u8; 30usize];
24578        for v in &mut tmp {
24579            *v = buf.get_u8();
24580        }
24581        __struct.tune = CharArray::new(tmp);
24582        let mut tmp = [0_u8; 200usize];
24583        for v in &mut tmp {
24584            *v = buf.get_u8();
24585        }
24586        __struct.tune2 = CharArray::new(tmp);
24587        Ok(__struct)
24588    }
24589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24590        let mut __tmp = BytesMut::new(bytes);
24591        #[allow(clippy::absurd_extreme_comparisons)]
24592        #[allow(unused_comparisons)]
24593        if __tmp.remaining() < Self::ENCODED_LEN {
24594            panic!(
24595                "buffer is too small (need {} bytes, but got {})",
24596                Self::ENCODED_LEN,
24597                __tmp.remaining(),
24598            )
24599        }
24600        __tmp.put_u8(self.target_system);
24601        __tmp.put_u8(self.target_component);
24602        for val in &self.tune {
24603            __tmp.put_u8(*val);
24604        }
24605        if matches!(version, MavlinkVersion::V2) {
24606            for val in &self.tune2 {
24607                __tmp.put_u8(*val);
24608            }
24609            let len = __tmp.len();
24610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24611        } else {
24612            __tmp.len()
24613        }
24614    }
24615}
24616#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24617#[doc = ""]
24618#[doc = "ID: 400"]
24619#[derive(Debug, Clone, PartialEq)]
24620#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24622#[cfg_attr(feature = "ts", derive(TS))]
24623#[cfg_attr(feature = "ts", ts(export))]
24624pub struct PLAY_TUNE_V2_DATA {
24625    #[doc = "Tune format"]
24626    pub format: TuneFormat,
24627    #[doc = "System ID"]
24628    pub target_system: u8,
24629    #[doc = "Component ID"]
24630    pub target_component: u8,
24631    #[doc = "Tune definition as a NULL-terminated string."]
24632    #[cfg_attr(feature = "ts", ts(type = "string"))]
24633    pub tune: CharArray<248>,
24634}
24635impl PLAY_TUNE_V2_DATA {
24636    pub const ENCODED_LEN: usize = 254usize;
24637    pub const DEFAULT: Self = Self {
24638        format: TuneFormat::DEFAULT,
24639        target_system: 0_u8,
24640        target_component: 0_u8,
24641        tune: CharArray::new([0_u8; 248usize]),
24642    };
24643    #[cfg(feature = "arbitrary")]
24644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24645        use arbitrary::{Arbitrary, Unstructured};
24646        let mut buf = [0u8; 1024];
24647        rng.fill_bytes(&mut buf);
24648        let mut unstructured = Unstructured::new(&buf);
24649        Self::arbitrary(&mut unstructured).unwrap_or_default()
24650    }
24651}
24652impl Default for PLAY_TUNE_V2_DATA {
24653    fn default() -> Self {
24654        Self::DEFAULT.clone()
24655    }
24656}
24657impl MessageData for PLAY_TUNE_V2_DATA {
24658    type Message = MavMessage;
24659    const ID: u32 = 400u32;
24660    const NAME: &'static str = "PLAY_TUNE_V2";
24661    const EXTRA_CRC: u8 = 110u8;
24662    const ENCODED_LEN: usize = 254usize;
24663    fn deser(
24664        _version: MavlinkVersion,
24665        __input: &[u8],
24666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24667        let avail_len = __input.len();
24668        let mut payload_buf = [0; Self::ENCODED_LEN];
24669        let mut buf = if avail_len < Self::ENCODED_LEN {
24670            payload_buf[0..avail_len].copy_from_slice(__input);
24671            Bytes::new(&payload_buf)
24672        } else {
24673            Bytes::new(__input)
24674        };
24675        let mut __struct = Self::default();
24676        let tmp = buf.get_u32_le();
24677        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24678            ::mavlink_core::error::ParserError::InvalidEnum {
24679                enum_type: "TuneFormat",
24680                value: tmp as u64,
24681            },
24682        )?;
24683        __struct.target_system = buf.get_u8();
24684        __struct.target_component = buf.get_u8();
24685        let mut tmp = [0_u8; 248usize];
24686        for v in &mut tmp {
24687            *v = buf.get_u8();
24688        }
24689        __struct.tune = CharArray::new(tmp);
24690        Ok(__struct)
24691    }
24692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24693        let mut __tmp = BytesMut::new(bytes);
24694        #[allow(clippy::absurd_extreme_comparisons)]
24695        #[allow(unused_comparisons)]
24696        if __tmp.remaining() < Self::ENCODED_LEN {
24697            panic!(
24698                "buffer is too small (need {} bytes, but got {})",
24699                Self::ENCODED_LEN,
24700                __tmp.remaining(),
24701            )
24702        }
24703        __tmp.put_u32_le(self.format as u32);
24704        __tmp.put_u8(self.target_system);
24705        __tmp.put_u8(self.target_component);
24706        for val in &self.tune {
24707            __tmp.put_u8(*val);
24708        }
24709        if matches!(version, MavlinkVersion::V2) {
24710            let len = __tmp.len();
24711            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24712        } else {
24713            __tmp.len()
24714        }
24715    }
24716}
24717#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24718#[doc = ""]
24719#[doc = "ID: 87"]
24720#[derive(Debug, Clone, PartialEq)]
24721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24723#[cfg_attr(feature = "ts", derive(TS))]
24724#[cfg_attr(feature = "ts", ts(export))]
24725pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24726    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24727    pub time_boot_ms: u32,
24728    #[doc = "Latitude in WGS84 frame"]
24729    pub lat_int: i32,
24730    #[doc = "Longitude in WGS84 frame"]
24731    pub lon_int: i32,
24732    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24733    pub alt: f32,
24734    #[doc = "X velocity in NED frame"]
24735    pub vx: f32,
24736    #[doc = "Y velocity in NED frame"]
24737    pub vy: f32,
24738    #[doc = "Z velocity in NED frame"]
24739    pub vz: f32,
24740    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24741    pub afx: f32,
24742    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24743    pub afy: f32,
24744    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24745    pub afz: f32,
24746    #[doc = "yaw setpoint"]
24747    pub yaw: f32,
24748    #[doc = "yaw rate setpoint"]
24749    pub yaw_rate: f32,
24750    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24751    pub type_mask: PositionTargetTypemask,
24752    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24753    pub coordinate_frame: MavFrame,
24754}
24755impl POSITION_TARGET_GLOBAL_INT_DATA {
24756    pub const ENCODED_LEN: usize = 51usize;
24757    pub const DEFAULT: Self = Self {
24758        time_boot_ms: 0_u32,
24759        lat_int: 0_i32,
24760        lon_int: 0_i32,
24761        alt: 0.0_f32,
24762        vx: 0.0_f32,
24763        vy: 0.0_f32,
24764        vz: 0.0_f32,
24765        afx: 0.0_f32,
24766        afy: 0.0_f32,
24767        afz: 0.0_f32,
24768        yaw: 0.0_f32,
24769        yaw_rate: 0.0_f32,
24770        type_mask: PositionTargetTypemask::DEFAULT,
24771        coordinate_frame: MavFrame::DEFAULT,
24772    };
24773    #[cfg(feature = "arbitrary")]
24774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24775        use arbitrary::{Arbitrary, Unstructured};
24776        let mut buf = [0u8; 1024];
24777        rng.fill_bytes(&mut buf);
24778        let mut unstructured = Unstructured::new(&buf);
24779        Self::arbitrary(&mut unstructured).unwrap_or_default()
24780    }
24781}
24782impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24783    fn default() -> Self {
24784        Self::DEFAULT.clone()
24785    }
24786}
24787impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24788    type Message = MavMessage;
24789    const ID: u32 = 87u32;
24790    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24791    const EXTRA_CRC: u8 = 150u8;
24792    const ENCODED_LEN: usize = 51usize;
24793    fn deser(
24794        _version: MavlinkVersion,
24795        __input: &[u8],
24796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24797        let avail_len = __input.len();
24798        let mut payload_buf = [0; Self::ENCODED_LEN];
24799        let mut buf = if avail_len < Self::ENCODED_LEN {
24800            payload_buf[0..avail_len].copy_from_slice(__input);
24801            Bytes::new(&payload_buf)
24802        } else {
24803            Bytes::new(__input)
24804        };
24805        let mut __struct = Self::default();
24806        __struct.time_boot_ms = buf.get_u32_le();
24807        __struct.lat_int = buf.get_i32_le();
24808        __struct.lon_int = buf.get_i32_le();
24809        __struct.alt = buf.get_f32_le();
24810        __struct.vx = buf.get_f32_le();
24811        __struct.vy = buf.get_f32_le();
24812        __struct.vz = buf.get_f32_le();
24813        __struct.afx = buf.get_f32_le();
24814        __struct.afy = buf.get_f32_le();
24815        __struct.afz = buf.get_f32_le();
24816        __struct.yaw = buf.get_f32_le();
24817        __struct.yaw_rate = buf.get_f32_le();
24818        let tmp = buf.get_u16_le();
24819        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
24820            ::mavlink_core::error::ParserError::InvalidFlag {
24821                flag_type: "PositionTargetTypemask",
24822                value: tmp as u64,
24823            },
24824        )?;
24825        let tmp = buf.get_u8();
24826        __struct.coordinate_frame =
24827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24828                enum_type: "MavFrame",
24829                value: tmp as u64,
24830            })?;
24831        Ok(__struct)
24832    }
24833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24834        let mut __tmp = BytesMut::new(bytes);
24835        #[allow(clippy::absurd_extreme_comparisons)]
24836        #[allow(unused_comparisons)]
24837        if __tmp.remaining() < Self::ENCODED_LEN {
24838            panic!(
24839                "buffer is too small (need {} bytes, but got {})",
24840                Self::ENCODED_LEN,
24841                __tmp.remaining(),
24842            )
24843        }
24844        __tmp.put_u32_le(self.time_boot_ms);
24845        __tmp.put_i32_le(self.lat_int);
24846        __tmp.put_i32_le(self.lon_int);
24847        __tmp.put_f32_le(self.alt);
24848        __tmp.put_f32_le(self.vx);
24849        __tmp.put_f32_le(self.vy);
24850        __tmp.put_f32_le(self.vz);
24851        __tmp.put_f32_le(self.afx);
24852        __tmp.put_f32_le(self.afy);
24853        __tmp.put_f32_le(self.afz);
24854        __tmp.put_f32_le(self.yaw);
24855        __tmp.put_f32_le(self.yaw_rate);
24856        __tmp.put_u16_le(self.type_mask.bits());
24857        __tmp.put_u8(self.coordinate_frame as u8);
24858        if matches!(version, MavlinkVersion::V2) {
24859            let len = __tmp.len();
24860            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24861        } else {
24862            __tmp.len()
24863        }
24864    }
24865}
24866#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24867#[doc = ""]
24868#[doc = "ID: 85"]
24869#[derive(Debug, Clone, PartialEq)]
24870#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24872#[cfg_attr(feature = "ts", derive(TS))]
24873#[cfg_attr(feature = "ts", ts(export))]
24874pub struct POSITION_TARGET_LOCAL_NED_DATA {
24875    #[doc = "Timestamp (time since system boot)."]
24876    pub time_boot_ms: u32,
24877    #[doc = "X Position in NED frame"]
24878    pub x: f32,
24879    #[doc = "Y Position in NED frame"]
24880    pub y: f32,
24881    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24882    pub z: f32,
24883    #[doc = "X velocity in NED frame"]
24884    pub vx: f32,
24885    #[doc = "Y velocity in NED frame"]
24886    pub vy: f32,
24887    #[doc = "Z velocity in NED frame"]
24888    pub vz: f32,
24889    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24890    pub afx: f32,
24891    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24892    pub afy: f32,
24893    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24894    pub afz: f32,
24895    #[doc = "yaw setpoint"]
24896    pub yaw: f32,
24897    #[doc = "yaw rate setpoint"]
24898    pub yaw_rate: f32,
24899    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24900    pub type_mask: PositionTargetTypemask,
24901    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24902    pub coordinate_frame: MavFrame,
24903}
24904impl POSITION_TARGET_LOCAL_NED_DATA {
24905    pub const ENCODED_LEN: usize = 51usize;
24906    pub const DEFAULT: Self = Self {
24907        time_boot_ms: 0_u32,
24908        x: 0.0_f32,
24909        y: 0.0_f32,
24910        z: 0.0_f32,
24911        vx: 0.0_f32,
24912        vy: 0.0_f32,
24913        vz: 0.0_f32,
24914        afx: 0.0_f32,
24915        afy: 0.0_f32,
24916        afz: 0.0_f32,
24917        yaw: 0.0_f32,
24918        yaw_rate: 0.0_f32,
24919        type_mask: PositionTargetTypemask::DEFAULT,
24920        coordinate_frame: MavFrame::DEFAULT,
24921    };
24922    #[cfg(feature = "arbitrary")]
24923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24924        use arbitrary::{Arbitrary, Unstructured};
24925        let mut buf = [0u8; 1024];
24926        rng.fill_bytes(&mut buf);
24927        let mut unstructured = Unstructured::new(&buf);
24928        Self::arbitrary(&mut unstructured).unwrap_or_default()
24929    }
24930}
24931impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24932    fn default() -> Self {
24933        Self::DEFAULT.clone()
24934    }
24935}
24936impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24937    type Message = MavMessage;
24938    const ID: u32 = 85u32;
24939    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24940    const EXTRA_CRC: u8 = 140u8;
24941    const ENCODED_LEN: usize = 51usize;
24942    fn deser(
24943        _version: MavlinkVersion,
24944        __input: &[u8],
24945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24946        let avail_len = __input.len();
24947        let mut payload_buf = [0; Self::ENCODED_LEN];
24948        let mut buf = if avail_len < Self::ENCODED_LEN {
24949            payload_buf[0..avail_len].copy_from_slice(__input);
24950            Bytes::new(&payload_buf)
24951        } else {
24952            Bytes::new(__input)
24953        };
24954        let mut __struct = Self::default();
24955        __struct.time_boot_ms = buf.get_u32_le();
24956        __struct.x = buf.get_f32_le();
24957        __struct.y = buf.get_f32_le();
24958        __struct.z = buf.get_f32_le();
24959        __struct.vx = buf.get_f32_le();
24960        __struct.vy = buf.get_f32_le();
24961        __struct.vz = buf.get_f32_le();
24962        __struct.afx = buf.get_f32_le();
24963        __struct.afy = buf.get_f32_le();
24964        __struct.afz = buf.get_f32_le();
24965        __struct.yaw = buf.get_f32_le();
24966        __struct.yaw_rate = buf.get_f32_le();
24967        let tmp = buf.get_u16_le();
24968        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
24969            ::mavlink_core::error::ParserError::InvalidFlag {
24970                flag_type: "PositionTargetTypemask",
24971                value: tmp as u64,
24972            },
24973        )?;
24974        let tmp = buf.get_u8();
24975        __struct.coordinate_frame =
24976            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24977                enum_type: "MavFrame",
24978                value: tmp as u64,
24979            })?;
24980        Ok(__struct)
24981    }
24982    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24983        let mut __tmp = BytesMut::new(bytes);
24984        #[allow(clippy::absurd_extreme_comparisons)]
24985        #[allow(unused_comparisons)]
24986        if __tmp.remaining() < Self::ENCODED_LEN {
24987            panic!(
24988                "buffer is too small (need {} bytes, but got {})",
24989                Self::ENCODED_LEN,
24990                __tmp.remaining(),
24991            )
24992        }
24993        __tmp.put_u32_le(self.time_boot_ms);
24994        __tmp.put_f32_le(self.x);
24995        __tmp.put_f32_le(self.y);
24996        __tmp.put_f32_le(self.z);
24997        __tmp.put_f32_le(self.vx);
24998        __tmp.put_f32_le(self.vy);
24999        __tmp.put_f32_le(self.vz);
25000        __tmp.put_f32_le(self.afx);
25001        __tmp.put_f32_le(self.afy);
25002        __tmp.put_f32_le(self.afz);
25003        __tmp.put_f32_le(self.yaw);
25004        __tmp.put_f32_le(self.yaw_rate);
25005        __tmp.put_u16_le(self.type_mask.bits());
25006        __tmp.put_u8(self.coordinate_frame as u8);
25007        if matches!(version, MavlinkVersion::V2) {
25008            let len = __tmp.len();
25009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25010        } else {
25011            __tmp.len()
25012        }
25013    }
25014}
25015#[doc = "Power supply status."]
25016#[doc = ""]
25017#[doc = "ID: 125"]
25018#[derive(Debug, Clone, PartialEq)]
25019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25021#[cfg_attr(feature = "ts", derive(TS))]
25022#[cfg_attr(feature = "ts", ts(export))]
25023pub struct POWER_STATUS_DATA {
25024    #[doc = "5V rail voltage."]
25025    pub Vcc: u16,
25026    #[doc = "Servo rail voltage."]
25027    pub Vservo: u16,
25028    #[doc = "Bitmap of power supply status flags."]
25029    pub flags: MavPowerStatus,
25030}
25031impl POWER_STATUS_DATA {
25032    pub const ENCODED_LEN: usize = 6usize;
25033    pub const DEFAULT: Self = Self {
25034        Vcc: 0_u16,
25035        Vservo: 0_u16,
25036        flags: MavPowerStatus::DEFAULT,
25037    };
25038    #[cfg(feature = "arbitrary")]
25039    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25040        use arbitrary::{Arbitrary, Unstructured};
25041        let mut buf = [0u8; 1024];
25042        rng.fill_bytes(&mut buf);
25043        let mut unstructured = Unstructured::new(&buf);
25044        Self::arbitrary(&mut unstructured).unwrap_or_default()
25045    }
25046}
25047impl Default for POWER_STATUS_DATA {
25048    fn default() -> Self {
25049        Self::DEFAULT.clone()
25050    }
25051}
25052impl MessageData for POWER_STATUS_DATA {
25053    type Message = MavMessage;
25054    const ID: u32 = 125u32;
25055    const NAME: &'static str = "POWER_STATUS";
25056    const EXTRA_CRC: u8 = 203u8;
25057    const ENCODED_LEN: usize = 6usize;
25058    fn deser(
25059        _version: MavlinkVersion,
25060        __input: &[u8],
25061    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25062        let avail_len = __input.len();
25063        let mut payload_buf = [0; Self::ENCODED_LEN];
25064        let mut buf = if avail_len < Self::ENCODED_LEN {
25065            payload_buf[0..avail_len].copy_from_slice(__input);
25066            Bytes::new(&payload_buf)
25067        } else {
25068            Bytes::new(__input)
25069        };
25070        let mut __struct = Self::default();
25071        __struct.Vcc = buf.get_u16_le();
25072        __struct.Vservo = buf.get_u16_le();
25073        let tmp = buf.get_u16_le();
25074        __struct.flags = MavPowerStatus::from_bits(tmp).ok_or(
25075            ::mavlink_core::error::ParserError::InvalidFlag {
25076                flag_type: "MavPowerStatus",
25077                value: tmp as u64,
25078            },
25079        )?;
25080        Ok(__struct)
25081    }
25082    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25083        let mut __tmp = BytesMut::new(bytes);
25084        #[allow(clippy::absurd_extreme_comparisons)]
25085        #[allow(unused_comparisons)]
25086        if __tmp.remaining() < Self::ENCODED_LEN {
25087            panic!(
25088                "buffer is too small (need {} bytes, but got {})",
25089                Self::ENCODED_LEN,
25090                __tmp.remaining(),
25091            )
25092        }
25093        __tmp.put_u16_le(self.Vcc);
25094        __tmp.put_u16_le(self.Vservo);
25095        __tmp.put_u16_le(self.flags.bits());
25096        if matches!(version, MavlinkVersion::V2) {
25097            let len = __tmp.len();
25098            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25099        } else {
25100            __tmp.len()
25101        }
25102    }
25103}
25104#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25105#[doc = ""]
25106#[doc = "ID: 300"]
25107#[derive(Debug, Clone, PartialEq)]
25108#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25110#[cfg_attr(feature = "ts", derive(TS))]
25111#[cfg_attr(feature = "ts", ts(export))]
25112pub struct PROTOCOL_VERSION_DATA {
25113    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25114    pub version: u16,
25115    #[doc = "Minimum MAVLink version supported"]
25116    pub min_version: u16,
25117    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25118    pub max_version: u16,
25119    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25121    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25122    pub spec_version_hash: [u8; 8],
25123    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25125    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25126    pub library_version_hash: [u8; 8],
25127}
25128impl PROTOCOL_VERSION_DATA {
25129    pub const ENCODED_LEN: usize = 22usize;
25130    pub const DEFAULT: Self = Self {
25131        version: 0_u16,
25132        min_version: 0_u16,
25133        max_version: 0_u16,
25134        spec_version_hash: [0_u8; 8usize],
25135        library_version_hash: [0_u8; 8usize],
25136    };
25137    #[cfg(feature = "arbitrary")]
25138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25139        use arbitrary::{Arbitrary, Unstructured};
25140        let mut buf = [0u8; 1024];
25141        rng.fill_bytes(&mut buf);
25142        let mut unstructured = Unstructured::new(&buf);
25143        Self::arbitrary(&mut unstructured).unwrap_or_default()
25144    }
25145}
25146impl Default for PROTOCOL_VERSION_DATA {
25147    fn default() -> Self {
25148        Self::DEFAULT.clone()
25149    }
25150}
25151impl MessageData for PROTOCOL_VERSION_DATA {
25152    type Message = MavMessage;
25153    const ID: u32 = 300u32;
25154    const NAME: &'static str = "PROTOCOL_VERSION";
25155    const EXTRA_CRC: u8 = 217u8;
25156    const ENCODED_LEN: usize = 22usize;
25157    fn deser(
25158        _version: MavlinkVersion,
25159        __input: &[u8],
25160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25161        let avail_len = __input.len();
25162        let mut payload_buf = [0; Self::ENCODED_LEN];
25163        let mut buf = if avail_len < Self::ENCODED_LEN {
25164            payload_buf[0..avail_len].copy_from_slice(__input);
25165            Bytes::new(&payload_buf)
25166        } else {
25167            Bytes::new(__input)
25168        };
25169        let mut __struct = Self::default();
25170        __struct.version = buf.get_u16_le();
25171        __struct.min_version = buf.get_u16_le();
25172        __struct.max_version = buf.get_u16_le();
25173        for v in &mut __struct.spec_version_hash {
25174            let val = buf.get_u8();
25175            *v = val;
25176        }
25177        for v in &mut __struct.library_version_hash {
25178            let val = buf.get_u8();
25179            *v = val;
25180        }
25181        Ok(__struct)
25182    }
25183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25184        let mut __tmp = BytesMut::new(bytes);
25185        #[allow(clippy::absurd_extreme_comparisons)]
25186        #[allow(unused_comparisons)]
25187        if __tmp.remaining() < Self::ENCODED_LEN {
25188            panic!(
25189                "buffer is too small (need {} bytes, but got {})",
25190                Self::ENCODED_LEN,
25191                __tmp.remaining(),
25192            )
25193        }
25194        __tmp.put_u16_le(self.version);
25195        __tmp.put_u16_le(self.min_version);
25196        __tmp.put_u16_le(self.max_version);
25197        for val in &self.spec_version_hash {
25198            __tmp.put_u8(*val);
25199        }
25200        for val in &self.library_version_hash {
25201            __tmp.put_u8(*val);
25202        }
25203        if matches!(version, MavlinkVersion::V2) {
25204            let len = __tmp.len();
25205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25206        } else {
25207            __tmp.len()
25208        }
25209    }
25210}
25211#[doc = "Status generated by radio and injected into MAVLink stream."]
25212#[doc = ""]
25213#[doc = "ID: 109"]
25214#[derive(Debug, Clone, PartialEq)]
25215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25217#[cfg_attr(feature = "ts", derive(TS))]
25218#[cfg_attr(feature = "ts", ts(export))]
25219pub struct RADIO_STATUS_DATA {
25220    #[doc = "Count of radio packet receive errors (since boot)."]
25221    pub rxerrors: u16,
25222    #[doc = "Count of error corrected radio packets (since boot)."]
25223    pub fixed: u16,
25224    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25225    pub rssi: u8,
25226    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25227    pub remrssi: u8,
25228    #[doc = "Remaining free transmitter buffer space."]
25229    pub txbuf: u8,
25230    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25231    pub noise: u8,
25232    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25233    pub remnoise: u8,
25234}
25235impl RADIO_STATUS_DATA {
25236    pub const ENCODED_LEN: usize = 9usize;
25237    pub const DEFAULT: Self = Self {
25238        rxerrors: 0_u16,
25239        fixed: 0_u16,
25240        rssi: 0_u8,
25241        remrssi: 0_u8,
25242        txbuf: 0_u8,
25243        noise: 0_u8,
25244        remnoise: 0_u8,
25245    };
25246    #[cfg(feature = "arbitrary")]
25247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25248        use arbitrary::{Arbitrary, Unstructured};
25249        let mut buf = [0u8; 1024];
25250        rng.fill_bytes(&mut buf);
25251        let mut unstructured = Unstructured::new(&buf);
25252        Self::arbitrary(&mut unstructured).unwrap_or_default()
25253    }
25254}
25255impl Default for RADIO_STATUS_DATA {
25256    fn default() -> Self {
25257        Self::DEFAULT.clone()
25258    }
25259}
25260impl MessageData for RADIO_STATUS_DATA {
25261    type Message = MavMessage;
25262    const ID: u32 = 109u32;
25263    const NAME: &'static str = "RADIO_STATUS";
25264    const EXTRA_CRC: u8 = 185u8;
25265    const ENCODED_LEN: usize = 9usize;
25266    fn deser(
25267        _version: MavlinkVersion,
25268        __input: &[u8],
25269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25270        let avail_len = __input.len();
25271        let mut payload_buf = [0; Self::ENCODED_LEN];
25272        let mut buf = if avail_len < Self::ENCODED_LEN {
25273            payload_buf[0..avail_len].copy_from_slice(__input);
25274            Bytes::new(&payload_buf)
25275        } else {
25276            Bytes::new(__input)
25277        };
25278        let mut __struct = Self::default();
25279        __struct.rxerrors = buf.get_u16_le();
25280        __struct.fixed = buf.get_u16_le();
25281        __struct.rssi = buf.get_u8();
25282        __struct.remrssi = buf.get_u8();
25283        __struct.txbuf = buf.get_u8();
25284        __struct.noise = buf.get_u8();
25285        __struct.remnoise = buf.get_u8();
25286        Ok(__struct)
25287    }
25288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25289        let mut __tmp = BytesMut::new(bytes);
25290        #[allow(clippy::absurd_extreme_comparisons)]
25291        #[allow(unused_comparisons)]
25292        if __tmp.remaining() < Self::ENCODED_LEN {
25293            panic!(
25294                "buffer is too small (need {} bytes, but got {})",
25295                Self::ENCODED_LEN,
25296                __tmp.remaining(),
25297            )
25298        }
25299        __tmp.put_u16_le(self.rxerrors);
25300        __tmp.put_u16_le(self.fixed);
25301        __tmp.put_u8(self.rssi);
25302        __tmp.put_u8(self.remrssi);
25303        __tmp.put_u8(self.txbuf);
25304        __tmp.put_u8(self.noise);
25305        __tmp.put_u8(self.remnoise);
25306        if matches!(version, MavlinkVersion::V2) {
25307            let len = __tmp.len();
25308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25309        } else {
25310            __tmp.len()
25311        }
25312    }
25313}
25314#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25315#[doc = ""]
25316#[doc = "ID: 27"]
25317#[derive(Debug, Clone, PartialEq)]
25318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25320#[cfg_attr(feature = "ts", derive(TS))]
25321#[cfg_attr(feature = "ts", ts(export))]
25322pub struct RAW_IMU_DATA {
25323    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25324    pub time_usec: u64,
25325    #[doc = "X acceleration (raw)"]
25326    pub xacc: i16,
25327    #[doc = "Y acceleration (raw)"]
25328    pub yacc: i16,
25329    #[doc = "Z acceleration (raw)"]
25330    pub zacc: i16,
25331    #[doc = "Angular speed around X axis (raw)"]
25332    pub xgyro: i16,
25333    #[doc = "Angular speed around Y axis (raw)"]
25334    pub ygyro: i16,
25335    #[doc = "Angular speed around Z axis (raw)"]
25336    pub zgyro: i16,
25337    #[doc = "X Magnetic field (raw)"]
25338    pub xmag: i16,
25339    #[doc = "Y Magnetic field (raw)"]
25340    pub ymag: i16,
25341    #[doc = "Z Magnetic field (raw)"]
25342    pub zmag: i16,
25343    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25345    pub id: u8,
25346    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25348    pub temperature: i16,
25349}
25350impl RAW_IMU_DATA {
25351    pub const ENCODED_LEN: usize = 29usize;
25352    pub const DEFAULT: Self = Self {
25353        time_usec: 0_u64,
25354        xacc: 0_i16,
25355        yacc: 0_i16,
25356        zacc: 0_i16,
25357        xgyro: 0_i16,
25358        ygyro: 0_i16,
25359        zgyro: 0_i16,
25360        xmag: 0_i16,
25361        ymag: 0_i16,
25362        zmag: 0_i16,
25363        id: 0_u8,
25364        temperature: 0_i16,
25365    };
25366    #[cfg(feature = "arbitrary")]
25367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25368        use arbitrary::{Arbitrary, Unstructured};
25369        let mut buf = [0u8; 1024];
25370        rng.fill_bytes(&mut buf);
25371        let mut unstructured = Unstructured::new(&buf);
25372        Self::arbitrary(&mut unstructured).unwrap_or_default()
25373    }
25374}
25375impl Default for RAW_IMU_DATA {
25376    fn default() -> Self {
25377        Self::DEFAULT.clone()
25378    }
25379}
25380impl MessageData for RAW_IMU_DATA {
25381    type Message = MavMessage;
25382    const ID: u32 = 27u32;
25383    const NAME: &'static str = "RAW_IMU";
25384    const EXTRA_CRC: u8 = 144u8;
25385    const ENCODED_LEN: usize = 29usize;
25386    fn deser(
25387        _version: MavlinkVersion,
25388        __input: &[u8],
25389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25390        let avail_len = __input.len();
25391        let mut payload_buf = [0; Self::ENCODED_LEN];
25392        let mut buf = if avail_len < Self::ENCODED_LEN {
25393            payload_buf[0..avail_len].copy_from_slice(__input);
25394            Bytes::new(&payload_buf)
25395        } else {
25396            Bytes::new(__input)
25397        };
25398        let mut __struct = Self::default();
25399        __struct.time_usec = buf.get_u64_le();
25400        __struct.xacc = buf.get_i16_le();
25401        __struct.yacc = buf.get_i16_le();
25402        __struct.zacc = buf.get_i16_le();
25403        __struct.xgyro = buf.get_i16_le();
25404        __struct.ygyro = buf.get_i16_le();
25405        __struct.zgyro = buf.get_i16_le();
25406        __struct.xmag = buf.get_i16_le();
25407        __struct.ymag = buf.get_i16_le();
25408        __struct.zmag = buf.get_i16_le();
25409        __struct.id = buf.get_u8();
25410        __struct.temperature = buf.get_i16_le();
25411        Ok(__struct)
25412    }
25413    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25414        let mut __tmp = BytesMut::new(bytes);
25415        #[allow(clippy::absurd_extreme_comparisons)]
25416        #[allow(unused_comparisons)]
25417        if __tmp.remaining() < Self::ENCODED_LEN {
25418            panic!(
25419                "buffer is too small (need {} bytes, but got {})",
25420                Self::ENCODED_LEN,
25421                __tmp.remaining(),
25422            )
25423        }
25424        __tmp.put_u64_le(self.time_usec);
25425        __tmp.put_i16_le(self.xacc);
25426        __tmp.put_i16_le(self.yacc);
25427        __tmp.put_i16_le(self.zacc);
25428        __tmp.put_i16_le(self.xgyro);
25429        __tmp.put_i16_le(self.ygyro);
25430        __tmp.put_i16_le(self.zgyro);
25431        __tmp.put_i16_le(self.xmag);
25432        __tmp.put_i16_le(self.ymag);
25433        __tmp.put_i16_le(self.zmag);
25434        if matches!(version, MavlinkVersion::V2) {
25435            __tmp.put_u8(self.id);
25436            __tmp.put_i16_le(self.temperature);
25437            let len = __tmp.len();
25438            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25439        } else {
25440            __tmp.len()
25441        }
25442    }
25443}
25444#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25445#[doc = ""]
25446#[doc = "ID: 28"]
25447#[derive(Debug, Clone, PartialEq)]
25448#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25450#[cfg_attr(feature = "ts", derive(TS))]
25451#[cfg_attr(feature = "ts", ts(export))]
25452pub struct RAW_PRESSURE_DATA {
25453    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25454    pub time_usec: u64,
25455    #[doc = "Absolute pressure (raw)"]
25456    pub press_abs: i16,
25457    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25458    pub press_diff1: i16,
25459    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25460    pub press_diff2: i16,
25461    #[doc = "Raw Temperature measurement (raw)"]
25462    pub temperature: i16,
25463}
25464impl RAW_PRESSURE_DATA {
25465    pub const ENCODED_LEN: usize = 16usize;
25466    pub const DEFAULT: Self = Self {
25467        time_usec: 0_u64,
25468        press_abs: 0_i16,
25469        press_diff1: 0_i16,
25470        press_diff2: 0_i16,
25471        temperature: 0_i16,
25472    };
25473    #[cfg(feature = "arbitrary")]
25474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25475        use arbitrary::{Arbitrary, Unstructured};
25476        let mut buf = [0u8; 1024];
25477        rng.fill_bytes(&mut buf);
25478        let mut unstructured = Unstructured::new(&buf);
25479        Self::arbitrary(&mut unstructured).unwrap_or_default()
25480    }
25481}
25482impl Default for RAW_PRESSURE_DATA {
25483    fn default() -> Self {
25484        Self::DEFAULT.clone()
25485    }
25486}
25487impl MessageData for RAW_PRESSURE_DATA {
25488    type Message = MavMessage;
25489    const ID: u32 = 28u32;
25490    const NAME: &'static str = "RAW_PRESSURE";
25491    const EXTRA_CRC: u8 = 67u8;
25492    const ENCODED_LEN: usize = 16usize;
25493    fn deser(
25494        _version: MavlinkVersion,
25495        __input: &[u8],
25496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25497        let avail_len = __input.len();
25498        let mut payload_buf = [0; Self::ENCODED_LEN];
25499        let mut buf = if avail_len < Self::ENCODED_LEN {
25500            payload_buf[0..avail_len].copy_from_slice(__input);
25501            Bytes::new(&payload_buf)
25502        } else {
25503            Bytes::new(__input)
25504        };
25505        let mut __struct = Self::default();
25506        __struct.time_usec = buf.get_u64_le();
25507        __struct.press_abs = buf.get_i16_le();
25508        __struct.press_diff1 = buf.get_i16_le();
25509        __struct.press_diff2 = buf.get_i16_le();
25510        __struct.temperature = buf.get_i16_le();
25511        Ok(__struct)
25512    }
25513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25514        let mut __tmp = BytesMut::new(bytes);
25515        #[allow(clippy::absurd_extreme_comparisons)]
25516        #[allow(unused_comparisons)]
25517        if __tmp.remaining() < Self::ENCODED_LEN {
25518            panic!(
25519                "buffer is too small (need {} bytes, but got {})",
25520                Self::ENCODED_LEN,
25521                __tmp.remaining(),
25522            )
25523        }
25524        __tmp.put_u64_le(self.time_usec);
25525        __tmp.put_i16_le(self.press_abs);
25526        __tmp.put_i16_le(self.press_diff1);
25527        __tmp.put_i16_le(self.press_diff2);
25528        __tmp.put_i16_le(self.temperature);
25529        if matches!(version, MavlinkVersion::V2) {
25530            let len = __tmp.len();
25531            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25532        } else {
25533            __tmp.len()
25534        }
25535    }
25536}
25537#[doc = "RPM sensor data message."]
25538#[doc = ""]
25539#[doc = "ID: 339"]
25540#[derive(Debug, Clone, PartialEq)]
25541#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25542#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25543#[cfg_attr(feature = "ts", derive(TS))]
25544#[cfg_attr(feature = "ts", ts(export))]
25545pub struct RAW_RPM_DATA {
25546    #[doc = "Indicated rate"]
25547    pub frequency: f32,
25548    #[doc = "Index of this RPM sensor (0-indexed)"]
25549    pub index: u8,
25550}
25551impl RAW_RPM_DATA {
25552    pub const ENCODED_LEN: usize = 5usize;
25553    pub const DEFAULT: Self = Self {
25554        frequency: 0.0_f32,
25555        index: 0_u8,
25556    };
25557    #[cfg(feature = "arbitrary")]
25558    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25559        use arbitrary::{Arbitrary, Unstructured};
25560        let mut buf = [0u8; 1024];
25561        rng.fill_bytes(&mut buf);
25562        let mut unstructured = Unstructured::new(&buf);
25563        Self::arbitrary(&mut unstructured).unwrap_or_default()
25564    }
25565}
25566impl Default for RAW_RPM_DATA {
25567    fn default() -> Self {
25568        Self::DEFAULT.clone()
25569    }
25570}
25571impl MessageData for RAW_RPM_DATA {
25572    type Message = MavMessage;
25573    const ID: u32 = 339u32;
25574    const NAME: &'static str = "RAW_RPM";
25575    const EXTRA_CRC: u8 = 199u8;
25576    const ENCODED_LEN: usize = 5usize;
25577    fn deser(
25578        _version: MavlinkVersion,
25579        __input: &[u8],
25580    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25581        let avail_len = __input.len();
25582        let mut payload_buf = [0; Self::ENCODED_LEN];
25583        let mut buf = if avail_len < Self::ENCODED_LEN {
25584            payload_buf[0..avail_len].copy_from_slice(__input);
25585            Bytes::new(&payload_buf)
25586        } else {
25587            Bytes::new(__input)
25588        };
25589        let mut __struct = Self::default();
25590        __struct.frequency = buf.get_f32_le();
25591        __struct.index = buf.get_u8();
25592        Ok(__struct)
25593    }
25594    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25595        let mut __tmp = BytesMut::new(bytes);
25596        #[allow(clippy::absurd_extreme_comparisons)]
25597        #[allow(unused_comparisons)]
25598        if __tmp.remaining() < Self::ENCODED_LEN {
25599            panic!(
25600                "buffer is too small (need {} bytes, but got {})",
25601                Self::ENCODED_LEN,
25602                __tmp.remaining(),
25603            )
25604        }
25605        __tmp.put_f32_le(self.frequency);
25606        __tmp.put_u8(self.index);
25607        if matches!(version, MavlinkVersion::V2) {
25608            let len = __tmp.len();
25609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25610        } else {
25611            __tmp.len()
25612        }
25613    }
25614}
25615#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25616#[doc = ""]
25617#[doc = "ID: 65"]
25618#[derive(Debug, Clone, PartialEq)]
25619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25621#[cfg_attr(feature = "ts", derive(TS))]
25622#[cfg_attr(feature = "ts", ts(export))]
25623pub struct RC_CHANNELS_DATA {
25624    #[doc = "Timestamp (time since system boot)."]
25625    pub time_boot_ms: u32,
25626    #[doc = "RC channel 1 value."]
25627    pub chan1_raw: u16,
25628    #[doc = "RC channel 2 value."]
25629    pub chan2_raw: u16,
25630    #[doc = "RC channel 3 value."]
25631    pub chan3_raw: u16,
25632    #[doc = "RC channel 4 value."]
25633    pub chan4_raw: u16,
25634    #[doc = "RC channel 5 value."]
25635    pub chan5_raw: u16,
25636    #[doc = "RC channel 6 value."]
25637    pub chan6_raw: u16,
25638    #[doc = "RC channel 7 value."]
25639    pub chan7_raw: u16,
25640    #[doc = "RC channel 8 value."]
25641    pub chan8_raw: u16,
25642    #[doc = "RC channel 9 value."]
25643    pub chan9_raw: u16,
25644    #[doc = "RC channel 10 value."]
25645    pub chan10_raw: u16,
25646    #[doc = "RC channel 11 value."]
25647    pub chan11_raw: u16,
25648    #[doc = "RC channel 12 value."]
25649    pub chan12_raw: u16,
25650    #[doc = "RC channel 13 value."]
25651    pub chan13_raw: u16,
25652    #[doc = "RC channel 14 value."]
25653    pub chan14_raw: u16,
25654    #[doc = "RC channel 15 value."]
25655    pub chan15_raw: u16,
25656    #[doc = "RC channel 16 value."]
25657    pub chan16_raw: u16,
25658    #[doc = "RC channel 17 value."]
25659    pub chan17_raw: u16,
25660    #[doc = "RC channel 18 value."]
25661    pub chan18_raw: u16,
25662    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25663    pub chancount: u8,
25664    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25665    pub rssi: u8,
25666}
25667impl RC_CHANNELS_DATA {
25668    pub const ENCODED_LEN: usize = 42usize;
25669    pub const DEFAULT: Self = Self {
25670        time_boot_ms: 0_u32,
25671        chan1_raw: 0_u16,
25672        chan2_raw: 0_u16,
25673        chan3_raw: 0_u16,
25674        chan4_raw: 0_u16,
25675        chan5_raw: 0_u16,
25676        chan6_raw: 0_u16,
25677        chan7_raw: 0_u16,
25678        chan8_raw: 0_u16,
25679        chan9_raw: 0_u16,
25680        chan10_raw: 0_u16,
25681        chan11_raw: 0_u16,
25682        chan12_raw: 0_u16,
25683        chan13_raw: 0_u16,
25684        chan14_raw: 0_u16,
25685        chan15_raw: 0_u16,
25686        chan16_raw: 0_u16,
25687        chan17_raw: 0_u16,
25688        chan18_raw: 0_u16,
25689        chancount: 0_u8,
25690        rssi: 0_u8,
25691    };
25692    #[cfg(feature = "arbitrary")]
25693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25694        use arbitrary::{Arbitrary, Unstructured};
25695        let mut buf = [0u8; 1024];
25696        rng.fill_bytes(&mut buf);
25697        let mut unstructured = Unstructured::new(&buf);
25698        Self::arbitrary(&mut unstructured).unwrap_or_default()
25699    }
25700}
25701impl Default for RC_CHANNELS_DATA {
25702    fn default() -> Self {
25703        Self::DEFAULT.clone()
25704    }
25705}
25706impl MessageData for RC_CHANNELS_DATA {
25707    type Message = MavMessage;
25708    const ID: u32 = 65u32;
25709    const NAME: &'static str = "RC_CHANNELS";
25710    const EXTRA_CRC: u8 = 118u8;
25711    const ENCODED_LEN: usize = 42usize;
25712    fn deser(
25713        _version: MavlinkVersion,
25714        __input: &[u8],
25715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25716        let avail_len = __input.len();
25717        let mut payload_buf = [0; Self::ENCODED_LEN];
25718        let mut buf = if avail_len < Self::ENCODED_LEN {
25719            payload_buf[0..avail_len].copy_from_slice(__input);
25720            Bytes::new(&payload_buf)
25721        } else {
25722            Bytes::new(__input)
25723        };
25724        let mut __struct = Self::default();
25725        __struct.time_boot_ms = buf.get_u32_le();
25726        __struct.chan1_raw = buf.get_u16_le();
25727        __struct.chan2_raw = buf.get_u16_le();
25728        __struct.chan3_raw = buf.get_u16_le();
25729        __struct.chan4_raw = buf.get_u16_le();
25730        __struct.chan5_raw = buf.get_u16_le();
25731        __struct.chan6_raw = buf.get_u16_le();
25732        __struct.chan7_raw = buf.get_u16_le();
25733        __struct.chan8_raw = buf.get_u16_le();
25734        __struct.chan9_raw = buf.get_u16_le();
25735        __struct.chan10_raw = buf.get_u16_le();
25736        __struct.chan11_raw = buf.get_u16_le();
25737        __struct.chan12_raw = buf.get_u16_le();
25738        __struct.chan13_raw = buf.get_u16_le();
25739        __struct.chan14_raw = buf.get_u16_le();
25740        __struct.chan15_raw = buf.get_u16_le();
25741        __struct.chan16_raw = buf.get_u16_le();
25742        __struct.chan17_raw = buf.get_u16_le();
25743        __struct.chan18_raw = buf.get_u16_le();
25744        __struct.chancount = buf.get_u8();
25745        __struct.rssi = buf.get_u8();
25746        Ok(__struct)
25747    }
25748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25749        let mut __tmp = BytesMut::new(bytes);
25750        #[allow(clippy::absurd_extreme_comparisons)]
25751        #[allow(unused_comparisons)]
25752        if __tmp.remaining() < Self::ENCODED_LEN {
25753            panic!(
25754                "buffer is too small (need {} bytes, but got {})",
25755                Self::ENCODED_LEN,
25756                __tmp.remaining(),
25757            )
25758        }
25759        __tmp.put_u32_le(self.time_boot_ms);
25760        __tmp.put_u16_le(self.chan1_raw);
25761        __tmp.put_u16_le(self.chan2_raw);
25762        __tmp.put_u16_le(self.chan3_raw);
25763        __tmp.put_u16_le(self.chan4_raw);
25764        __tmp.put_u16_le(self.chan5_raw);
25765        __tmp.put_u16_le(self.chan6_raw);
25766        __tmp.put_u16_le(self.chan7_raw);
25767        __tmp.put_u16_le(self.chan8_raw);
25768        __tmp.put_u16_le(self.chan9_raw);
25769        __tmp.put_u16_le(self.chan10_raw);
25770        __tmp.put_u16_le(self.chan11_raw);
25771        __tmp.put_u16_le(self.chan12_raw);
25772        __tmp.put_u16_le(self.chan13_raw);
25773        __tmp.put_u16_le(self.chan14_raw);
25774        __tmp.put_u16_le(self.chan15_raw);
25775        __tmp.put_u16_le(self.chan16_raw);
25776        __tmp.put_u16_le(self.chan17_raw);
25777        __tmp.put_u16_le(self.chan18_raw);
25778        __tmp.put_u8(self.chancount);
25779        __tmp.put_u8(self.rssi);
25780        if matches!(version, MavlinkVersion::V2) {
25781            let len = __tmp.len();
25782            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25783        } else {
25784            __tmp.len()
25785        }
25786    }
25787}
25788#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25789#[doc = ""]
25790#[doc = "ID: 70"]
25791#[derive(Debug, Clone, PartialEq)]
25792#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25793#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25794#[cfg_attr(feature = "ts", derive(TS))]
25795#[cfg_attr(feature = "ts", ts(export))]
25796pub struct RC_CHANNELS_OVERRIDE_DATA {
25797    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25798    pub chan1_raw: u16,
25799    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25800    pub chan2_raw: u16,
25801    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25802    pub chan3_raw: u16,
25803    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25804    pub chan4_raw: u16,
25805    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25806    pub chan5_raw: u16,
25807    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25808    pub chan6_raw: u16,
25809    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25810    pub chan7_raw: u16,
25811    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25812    pub chan8_raw: u16,
25813    #[doc = "System ID"]
25814    pub target_system: u8,
25815    #[doc = "Component ID"]
25816    pub target_component: u8,
25817    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25818    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25819    pub chan9_raw: u16,
25820    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25822    pub chan10_raw: u16,
25823    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25825    pub chan11_raw: u16,
25826    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25828    pub chan12_raw: u16,
25829    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25830    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25831    pub chan13_raw: u16,
25832    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25833    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25834    pub chan14_raw: u16,
25835    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25836    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25837    pub chan15_raw: u16,
25838    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25839    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25840    pub chan16_raw: u16,
25841    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25842    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25843    pub chan17_raw: u16,
25844    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25846    pub chan18_raw: u16,
25847}
25848impl RC_CHANNELS_OVERRIDE_DATA {
25849    pub const ENCODED_LEN: usize = 38usize;
25850    pub const DEFAULT: Self = Self {
25851        chan1_raw: 0_u16,
25852        chan2_raw: 0_u16,
25853        chan3_raw: 0_u16,
25854        chan4_raw: 0_u16,
25855        chan5_raw: 0_u16,
25856        chan6_raw: 0_u16,
25857        chan7_raw: 0_u16,
25858        chan8_raw: 0_u16,
25859        target_system: 0_u8,
25860        target_component: 0_u8,
25861        chan9_raw: 0_u16,
25862        chan10_raw: 0_u16,
25863        chan11_raw: 0_u16,
25864        chan12_raw: 0_u16,
25865        chan13_raw: 0_u16,
25866        chan14_raw: 0_u16,
25867        chan15_raw: 0_u16,
25868        chan16_raw: 0_u16,
25869        chan17_raw: 0_u16,
25870        chan18_raw: 0_u16,
25871    };
25872    #[cfg(feature = "arbitrary")]
25873    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25874        use arbitrary::{Arbitrary, Unstructured};
25875        let mut buf = [0u8; 1024];
25876        rng.fill_bytes(&mut buf);
25877        let mut unstructured = Unstructured::new(&buf);
25878        Self::arbitrary(&mut unstructured).unwrap_or_default()
25879    }
25880}
25881impl Default for RC_CHANNELS_OVERRIDE_DATA {
25882    fn default() -> Self {
25883        Self::DEFAULT.clone()
25884    }
25885}
25886impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25887    type Message = MavMessage;
25888    const ID: u32 = 70u32;
25889    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25890    const EXTRA_CRC: u8 = 124u8;
25891    const ENCODED_LEN: usize = 38usize;
25892    fn deser(
25893        _version: MavlinkVersion,
25894        __input: &[u8],
25895    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25896        let avail_len = __input.len();
25897        let mut payload_buf = [0; Self::ENCODED_LEN];
25898        let mut buf = if avail_len < Self::ENCODED_LEN {
25899            payload_buf[0..avail_len].copy_from_slice(__input);
25900            Bytes::new(&payload_buf)
25901        } else {
25902            Bytes::new(__input)
25903        };
25904        let mut __struct = Self::default();
25905        __struct.chan1_raw = buf.get_u16_le();
25906        __struct.chan2_raw = buf.get_u16_le();
25907        __struct.chan3_raw = buf.get_u16_le();
25908        __struct.chan4_raw = buf.get_u16_le();
25909        __struct.chan5_raw = buf.get_u16_le();
25910        __struct.chan6_raw = buf.get_u16_le();
25911        __struct.chan7_raw = buf.get_u16_le();
25912        __struct.chan8_raw = buf.get_u16_le();
25913        __struct.target_system = buf.get_u8();
25914        __struct.target_component = buf.get_u8();
25915        __struct.chan9_raw = buf.get_u16_le();
25916        __struct.chan10_raw = buf.get_u16_le();
25917        __struct.chan11_raw = buf.get_u16_le();
25918        __struct.chan12_raw = buf.get_u16_le();
25919        __struct.chan13_raw = buf.get_u16_le();
25920        __struct.chan14_raw = buf.get_u16_le();
25921        __struct.chan15_raw = buf.get_u16_le();
25922        __struct.chan16_raw = buf.get_u16_le();
25923        __struct.chan17_raw = buf.get_u16_le();
25924        __struct.chan18_raw = buf.get_u16_le();
25925        Ok(__struct)
25926    }
25927    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25928        let mut __tmp = BytesMut::new(bytes);
25929        #[allow(clippy::absurd_extreme_comparisons)]
25930        #[allow(unused_comparisons)]
25931        if __tmp.remaining() < Self::ENCODED_LEN {
25932            panic!(
25933                "buffer is too small (need {} bytes, but got {})",
25934                Self::ENCODED_LEN,
25935                __tmp.remaining(),
25936            )
25937        }
25938        __tmp.put_u16_le(self.chan1_raw);
25939        __tmp.put_u16_le(self.chan2_raw);
25940        __tmp.put_u16_le(self.chan3_raw);
25941        __tmp.put_u16_le(self.chan4_raw);
25942        __tmp.put_u16_le(self.chan5_raw);
25943        __tmp.put_u16_le(self.chan6_raw);
25944        __tmp.put_u16_le(self.chan7_raw);
25945        __tmp.put_u16_le(self.chan8_raw);
25946        __tmp.put_u8(self.target_system);
25947        __tmp.put_u8(self.target_component);
25948        if matches!(version, MavlinkVersion::V2) {
25949            __tmp.put_u16_le(self.chan9_raw);
25950            __tmp.put_u16_le(self.chan10_raw);
25951            __tmp.put_u16_le(self.chan11_raw);
25952            __tmp.put_u16_le(self.chan12_raw);
25953            __tmp.put_u16_le(self.chan13_raw);
25954            __tmp.put_u16_le(self.chan14_raw);
25955            __tmp.put_u16_le(self.chan15_raw);
25956            __tmp.put_u16_le(self.chan16_raw);
25957            __tmp.put_u16_le(self.chan17_raw);
25958            __tmp.put_u16_le(self.chan18_raw);
25959            let len = __tmp.len();
25960            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25961        } else {
25962            __tmp.len()
25963        }
25964    }
25965}
25966#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25967#[doc = ""]
25968#[doc = "ID: 35"]
25969#[derive(Debug, Clone, PartialEq)]
25970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25972#[cfg_attr(feature = "ts", derive(TS))]
25973#[cfg_attr(feature = "ts", ts(export))]
25974pub struct RC_CHANNELS_RAW_DATA {
25975    #[doc = "Timestamp (time since system boot)."]
25976    pub time_boot_ms: u32,
25977    #[doc = "RC channel 1 value."]
25978    pub chan1_raw: u16,
25979    #[doc = "RC channel 2 value."]
25980    pub chan2_raw: u16,
25981    #[doc = "RC channel 3 value."]
25982    pub chan3_raw: u16,
25983    #[doc = "RC channel 4 value."]
25984    pub chan4_raw: u16,
25985    #[doc = "RC channel 5 value."]
25986    pub chan5_raw: u16,
25987    #[doc = "RC channel 6 value."]
25988    pub chan6_raw: u16,
25989    #[doc = "RC channel 7 value."]
25990    pub chan7_raw: u16,
25991    #[doc = "RC channel 8 value."]
25992    pub chan8_raw: u16,
25993    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25994    pub port: u8,
25995    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25996    pub rssi: u8,
25997}
25998impl RC_CHANNELS_RAW_DATA {
25999    pub const ENCODED_LEN: usize = 22usize;
26000    pub const DEFAULT: Self = Self {
26001        time_boot_ms: 0_u32,
26002        chan1_raw: 0_u16,
26003        chan2_raw: 0_u16,
26004        chan3_raw: 0_u16,
26005        chan4_raw: 0_u16,
26006        chan5_raw: 0_u16,
26007        chan6_raw: 0_u16,
26008        chan7_raw: 0_u16,
26009        chan8_raw: 0_u16,
26010        port: 0_u8,
26011        rssi: 0_u8,
26012    };
26013    #[cfg(feature = "arbitrary")]
26014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26015        use arbitrary::{Arbitrary, Unstructured};
26016        let mut buf = [0u8; 1024];
26017        rng.fill_bytes(&mut buf);
26018        let mut unstructured = Unstructured::new(&buf);
26019        Self::arbitrary(&mut unstructured).unwrap_or_default()
26020    }
26021}
26022impl Default for RC_CHANNELS_RAW_DATA {
26023    fn default() -> Self {
26024        Self::DEFAULT.clone()
26025    }
26026}
26027impl MessageData for RC_CHANNELS_RAW_DATA {
26028    type Message = MavMessage;
26029    const ID: u32 = 35u32;
26030    const NAME: &'static str = "RC_CHANNELS_RAW";
26031    const EXTRA_CRC: u8 = 244u8;
26032    const ENCODED_LEN: usize = 22usize;
26033    fn deser(
26034        _version: MavlinkVersion,
26035        __input: &[u8],
26036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26037        let avail_len = __input.len();
26038        let mut payload_buf = [0; Self::ENCODED_LEN];
26039        let mut buf = if avail_len < Self::ENCODED_LEN {
26040            payload_buf[0..avail_len].copy_from_slice(__input);
26041            Bytes::new(&payload_buf)
26042        } else {
26043            Bytes::new(__input)
26044        };
26045        let mut __struct = Self::default();
26046        __struct.time_boot_ms = buf.get_u32_le();
26047        __struct.chan1_raw = buf.get_u16_le();
26048        __struct.chan2_raw = buf.get_u16_le();
26049        __struct.chan3_raw = buf.get_u16_le();
26050        __struct.chan4_raw = buf.get_u16_le();
26051        __struct.chan5_raw = buf.get_u16_le();
26052        __struct.chan6_raw = buf.get_u16_le();
26053        __struct.chan7_raw = buf.get_u16_le();
26054        __struct.chan8_raw = buf.get_u16_le();
26055        __struct.port = buf.get_u8();
26056        __struct.rssi = buf.get_u8();
26057        Ok(__struct)
26058    }
26059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26060        let mut __tmp = BytesMut::new(bytes);
26061        #[allow(clippy::absurd_extreme_comparisons)]
26062        #[allow(unused_comparisons)]
26063        if __tmp.remaining() < Self::ENCODED_LEN {
26064            panic!(
26065                "buffer is too small (need {} bytes, but got {})",
26066                Self::ENCODED_LEN,
26067                __tmp.remaining(),
26068            )
26069        }
26070        __tmp.put_u32_le(self.time_boot_ms);
26071        __tmp.put_u16_le(self.chan1_raw);
26072        __tmp.put_u16_le(self.chan2_raw);
26073        __tmp.put_u16_le(self.chan3_raw);
26074        __tmp.put_u16_le(self.chan4_raw);
26075        __tmp.put_u16_le(self.chan5_raw);
26076        __tmp.put_u16_le(self.chan6_raw);
26077        __tmp.put_u16_le(self.chan7_raw);
26078        __tmp.put_u16_le(self.chan8_raw);
26079        __tmp.put_u8(self.port);
26080        __tmp.put_u8(self.rssi);
26081        if matches!(version, MavlinkVersion::V2) {
26082            let len = __tmp.len();
26083            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26084        } else {
26085            __tmp.len()
26086        }
26087    }
26088}
26089#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26090#[doc = ""]
26091#[doc = "ID: 34"]
26092#[derive(Debug, Clone, PartialEq)]
26093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26095#[cfg_attr(feature = "ts", derive(TS))]
26096#[cfg_attr(feature = "ts", ts(export))]
26097pub struct RC_CHANNELS_SCALED_DATA {
26098    #[doc = "Timestamp (time since system boot)."]
26099    pub time_boot_ms: u32,
26100    #[doc = "RC channel 1 value scaled."]
26101    pub chan1_scaled: i16,
26102    #[doc = "RC channel 2 value scaled."]
26103    pub chan2_scaled: i16,
26104    #[doc = "RC channel 3 value scaled."]
26105    pub chan3_scaled: i16,
26106    #[doc = "RC channel 4 value scaled."]
26107    pub chan4_scaled: i16,
26108    #[doc = "RC channel 5 value scaled."]
26109    pub chan5_scaled: i16,
26110    #[doc = "RC channel 6 value scaled."]
26111    pub chan6_scaled: i16,
26112    #[doc = "RC channel 7 value scaled."]
26113    pub chan7_scaled: i16,
26114    #[doc = "RC channel 8 value scaled."]
26115    pub chan8_scaled: i16,
26116    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26117    pub port: u8,
26118    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26119    pub rssi: u8,
26120}
26121impl RC_CHANNELS_SCALED_DATA {
26122    pub const ENCODED_LEN: usize = 22usize;
26123    pub const DEFAULT: Self = Self {
26124        time_boot_ms: 0_u32,
26125        chan1_scaled: 0_i16,
26126        chan2_scaled: 0_i16,
26127        chan3_scaled: 0_i16,
26128        chan4_scaled: 0_i16,
26129        chan5_scaled: 0_i16,
26130        chan6_scaled: 0_i16,
26131        chan7_scaled: 0_i16,
26132        chan8_scaled: 0_i16,
26133        port: 0_u8,
26134        rssi: 0_u8,
26135    };
26136    #[cfg(feature = "arbitrary")]
26137    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26138        use arbitrary::{Arbitrary, Unstructured};
26139        let mut buf = [0u8; 1024];
26140        rng.fill_bytes(&mut buf);
26141        let mut unstructured = Unstructured::new(&buf);
26142        Self::arbitrary(&mut unstructured).unwrap_or_default()
26143    }
26144}
26145impl Default for RC_CHANNELS_SCALED_DATA {
26146    fn default() -> Self {
26147        Self::DEFAULT.clone()
26148    }
26149}
26150impl MessageData for RC_CHANNELS_SCALED_DATA {
26151    type Message = MavMessage;
26152    const ID: u32 = 34u32;
26153    const NAME: &'static str = "RC_CHANNELS_SCALED";
26154    const EXTRA_CRC: u8 = 237u8;
26155    const ENCODED_LEN: usize = 22usize;
26156    fn deser(
26157        _version: MavlinkVersion,
26158        __input: &[u8],
26159    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26160        let avail_len = __input.len();
26161        let mut payload_buf = [0; Self::ENCODED_LEN];
26162        let mut buf = if avail_len < Self::ENCODED_LEN {
26163            payload_buf[0..avail_len].copy_from_slice(__input);
26164            Bytes::new(&payload_buf)
26165        } else {
26166            Bytes::new(__input)
26167        };
26168        let mut __struct = Self::default();
26169        __struct.time_boot_ms = buf.get_u32_le();
26170        __struct.chan1_scaled = buf.get_i16_le();
26171        __struct.chan2_scaled = buf.get_i16_le();
26172        __struct.chan3_scaled = buf.get_i16_le();
26173        __struct.chan4_scaled = buf.get_i16_le();
26174        __struct.chan5_scaled = buf.get_i16_le();
26175        __struct.chan6_scaled = buf.get_i16_le();
26176        __struct.chan7_scaled = buf.get_i16_le();
26177        __struct.chan8_scaled = buf.get_i16_le();
26178        __struct.port = buf.get_u8();
26179        __struct.rssi = buf.get_u8();
26180        Ok(__struct)
26181    }
26182    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26183        let mut __tmp = BytesMut::new(bytes);
26184        #[allow(clippy::absurd_extreme_comparisons)]
26185        #[allow(unused_comparisons)]
26186        if __tmp.remaining() < Self::ENCODED_LEN {
26187            panic!(
26188                "buffer is too small (need {} bytes, but got {})",
26189                Self::ENCODED_LEN,
26190                __tmp.remaining(),
26191            )
26192        }
26193        __tmp.put_u32_le(self.time_boot_ms);
26194        __tmp.put_i16_le(self.chan1_scaled);
26195        __tmp.put_i16_le(self.chan2_scaled);
26196        __tmp.put_i16_le(self.chan3_scaled);
26197        __tmp.put_i16_le(self.chan4_scaled);
26198        __tmp.put_i16_le(self.chan5_scaled);
26199        __tmp.put_i16_le(self.chan6_scaled);
26200        __tmp.put_i16_le(self.chan7_scaled);
26201        __tmp.put_i16_le(self.chan8_scaled);
26202        __tmp.put_u8(self.port);
26203        __tmp.put_u8(self.rssi);
26204        if matches!(version, MavlinkVersion::V2) {
26205            let len = __tmp.len();
26206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26207        } else {
26208            __tmp.len()
26209        }
26210    }
26211}
26212#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26213#[doc = "Request a data stream."]
26214#[doc = ""]
26215#[doc = "ID: 66"]
26216#[derive(Debug, Clone, PartialEq)]
26217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26219#[cfg_attr(feature = "ts", derive(TS))]
26220#[cfg_attr(feature = "ts", ts(export))]
26221pub struct REQUEST_DATA_STREAM_DATA {
26222    #[doc = "The requested message rate"]
26223    pub req_message_rate: u16,
26224    #[doc = "The target requested to send the message stream."]
26225    pub target_system: u8,
26226    #[doc = "The target requested to send the message stream."]
26227    pub target_component: u8,
26228    #[doc = "The ID of the requested data stream"]
26229    pub req_stream_id: u8,
26230    #[doc = "1 to start sending, 0 to stop sending."]
26231    pub start_stop: u8,
26232}
26233impl REQUEST_DATA_STREAM_DATA {
26234    pub const ENCODED_LEN: usize = 6usize;
26235    pub const DEFAULT: Self = Self {
26236        req_message_rate: 0_u16,
26237        target_system: 0_u8,
26238        target_component: 0_u8,
26239        req_stream_id: 0_u8,
26240        start_stop: 0_u8,
26241    };
26242    #[cfg(feature = "arbitrary")]
26243    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26244        use arbitrary::{Arbitrary, Unstructured};
26245        let mut buf = [0u8; 1024];
26246        rng.fill_bytes(&mut buf);
26247        let mut unstructured = Unstructured::new(&buf);
26248        Self::arbitrary(&mut unstructured).unwrap_or_default()
26249    }
26250}
26251impl Default for REQUEST_DATA_STREAM_DATA {
26252    fn default() -> Self {
26253        Self::DEFAULT.clone()
26254    }
26255}
26256impl MessageData for REQUEST_DATA_STREAM_DATA {
26257    type Message = MavMessage;
26258    const ID: u32 = 66u32;
26259    const NAME: &'static str = "REQUEST_DATA_STREAM";
26260    const EXTRA_CRC: u8 = 148u8;
26261    const ENCODED_LEN: usize = 6usize;
26262    fn deser(
26263        _version: MavlinkVersion,
26264        __input: &[u8],
26265    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26266        let avail_len = __input.len();
26267        let mut payload_buf = [0; Self::ENCODED_LEN];
26268        let mut buf = if avail_len < Self::ENCODED_LEN {
26269            payload_buf[0..avail_len].copy_from_slice(__input);
26270            Bytes::new(&payload_buf)
26271        } else {
26272            Bytes::new(__input)
26273        };
26274        let mut __struct = Self::default();
26275        __struct.req_message_rate = buf.get_u16_le();
26276        __struct.target_system = buf.get_u8();
26277        __struct.target_component = buf.get_u8();
26278        __struct.req_stream_id = buf.get_u8();
26279        __struct.start_stop = buf.get_u8();
26280        Ok(__struct)
26281    }
26282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26283        let mut __tmp = BytesMut::new(bytes);
26284        #[allow(clippy::absurd_extreme_comparisons)]
26285        #[allow(unused_comparisons)]
26286        if __tmp.remaining() < Self::ENCODED_LEN {
26287            panic!(
26288                "buffer is too small (need {} bytes, but got {})",
26289                Self::ENCODED_LEN,
26290                __tmp.remaining(),
26291            )
26292        }
26293        __tmp.put_u16_le(self.req_message_rate);
26294        __tmp.put_u8(self.target_system);
26295        __tmp.put_u8(self.target_component);
26296        __tmp.put_u8(self.req_stream_id);
26297        __tmp.put_u8(self.start_stop);
26298        if matches!(version, MavlinkVersion::V2) {
26299            let len = __tmp.len();
26300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26301        } else {
26302            __tmp.len()
26303        }
26304    }
26305}
26306#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26307#[doc = ""]
26308#[doc = "ID: 412"]
26309#[derive(Debug, Clone, PartialEq)]
26310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26312#[cfg_attr(feature = "ts", derive(TS))]
26313#[cfg_attr(feature = "ts", ts(export))]
26314pub struct REQUEST_EVENT_DATA {
26315    #[doc = "First sequence number of the requested event."]
26316    pub first_sequence: u16,
26317    #[doc = "Last sequence number of the requested event."]
26318    pub last_sequence: u16,
26319    #[doc = "System ID"]
26320    pub target_system: u8,
26321    #[doc = "Component ID"]
26322    pub target_component: u8,
26323}
26324impl REQUEST_EVENT_DATA {
26325    pub const ENCODED_LEN: usize = 6usize;
26326    pub const DEFAULT: Self = Self {
26327        first_sequence: 0_u16,
26328        last_sequence: 0_u16,
26329        target_system: 0_u8,
26330        target_component: 0_u8,
26331    };
26332    #[cfg(feature = "arbitrary")]
26333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26334        use arbitrary::{Arbitrary, Unstructured};
26335        let mut buf = [0u8; 1024];
26336        rng.fill_bytes(&mut buf);
26337        let mut unstructured = Unstructured::new(&buf);
26338        Self::arbitrary(&mut unstructured).unwrap_or_default()
26339    }
26340}
26341impl Default for REQUEST_EVENT_DATA {
26342    fn default() -> Self {
26343        Self::DEFAULT.clone()
26344    }
26345}
26346impl MessageData for REQUEST_EVENT_DATA {
26347    type Message = MavMessage;
26348    const ID: u32 = 412u32;
26349    const NAME: &'static str = "REQUEST_EVENT";
26350    const EXTRA_CRC: u8 = 33u8;
26351    const ENCODED_LEN: usize = 6usize;
26352    fn deser(
26353        _version: MavlinkVersion,
26354        __input: &[u8],
26355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26356        let avail_len = __input.len();
26357        let mut payload_buf = [0; Self::ENCODED_LEN];
26358        let mut buf = if avail_len < Self::ENCODED_LEN {
26359            payload_buf[0..avail_len].copy_from_slice(__input);
26360            Bytes::new(&payload_buf)
26361        } else {
26362            Bytes::new(__input)
26363        };
26364        let mut __struct = Self::default();
26365        __struct.first_sequence = buf.get_u16_le();
26366        __struct.last_sequence = buf.get_u16_le();
26367        __struct.target_system = buf.get_u8();
26368        __struct.target_component = buf.get_u8();
26369        Ok(__struct)
26370    }
26371    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26372        let mut __tmp = BytesMut::new(bytes);
26373        #[allow(clippy::absurd_extreme_comparisons)]
26374        #[allow(unused_comparisons)]
26375        if __tmp.remaining() < Self::ENCODED_LEN {
26376            panic!(
26377                "buffer is too small (need {} bytes, but got {})",
26378                Self::ENCODED_LEN,
26379                __tmp.remaining(),
26380            )
26381        }
26382        __tmp.put_u16_le(self.first_sequence);
26383        __tmp.put_u16_le(self.last_sequence);
26384        __tmp.put_u8(self.target_system);
26385        __tmp.put_u8(self.target_component);
26386        if matches!(version, MavlinkVersion::V2) {
26387            let len = __tmp.len();
26388            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26389        } else {
26390            __tmp.len()
26391        }
26392    }
26393}
26394#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26395#[doc = ""]
26396#[doc = "ID: 142"]
26397#[derive(Debug, Clone, PartialEq)]
26398#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26399#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26400#[cfg_attr(feature = "ts", derive(TS))]
26401#[cfg_attr(feature = "ts", ts(export))]
26402pub struct RESOURCE_REQUEST_DATA {
26403    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26404    pub request_id: u8,
26405    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26406    pub uri_type: u8,
26407    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26408    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26409    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26410    pub uri: [u8; 120],
26411    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26412    pub transfer_type: u8,
26413    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26414    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26415    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
26416    pub storage: [u8; 120],
26417}
26418impl RESOURCE_REQUEST_DATA {
26419    pub const ENCODED_LEN: usize = 243usize;
26420    pub const DEFAULT: Self = Self {
26421        request_id: 0_u8,
26422        uri_type: 0_u8,
26423        uri: [0_u8; 120usize],
26424        transfer_type: 0_u8,
26425        storage: [0_u8; 120usize],
26426    };
26427    #[cfg(feature = "arbitrary")]
26428    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26429        use arbitrary::{Arbitrary, Unstructured};
26430        let mut buf = [0u8; 1024];
26431        rng.fill_bytes(&mut buf);
26432        let mut unstructured = Unstructured::new(&buf);
26433        Self::arbitrary(&mut unstructured).unwrap_or_default()
26434    }
26435}
26436impl Default for RESOURCE_REQUEST_DATA {
26437    fn default() -> Self {
26438        Self::DEFAULT.clone()
26439    }
26440}
26441impl MessageData for RESOURCE_REQUEST_DATA {
26442    type Message = MavMessage;
26443    const ID: u32 = 142u32;
26444    const NAME: &'static str = "RESOURCE_REQUEST";
26445    const EXTRA_CRC: u8 = 72u8;
26446    const ENCODED_LEN: usize = 243usize;
26447    fn deser(
26448        _version: MavlinkVersion,
26449        __input: &[u8],
26450    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26451        let avail_len = __input.len();
26452        let mut payload_buf = [0; Self::ENCODED_LEN];
26453        let mut buf = if avail_len < Self::ENCODED_LEN {
26454            payload_buf[0..avail_len].copy_from_slice(__input);
26455            Bytes::new(&payload_buf)
26456        } else {
26457            Bytes::new(__input)
26458        };
26459        let mut __struct = Self::default();
26460        __struct.request_id = buf.get_u8();
26461        __struct.uri_type = buf.get_u8();
26462        for v in &mut __struct.uri {
26463            let val = buf.get_u8();
26464            *v = val;
26465        }
26466        __struct.transfer_type = buf.get_u8();
26467        for v in &mut __struct.storage {
26468            let val = buf.get_u8();
26469            *v = val;
26470        }
26471        Ok(__struct)
26472    }
26473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26474        let mut __tmp = BytesMut::new(bytes);
26475        #[allow(clippy::absurd_extreme_comparisons)]
26476        #[allow(unused_comparisons)]
26477        if __tmp.remaining() < Self::ENCODED_LEN {
26478            panic!(
26479                "buffer is too small (need {} bytes, but got {})",
26480                Self::ENCODED_LEN,
26481                __tmp.remaining(),
26482            )
26483        }
26484        __tmp.put_u8(self.request_id);
26485        __tmp.put_u8(self.uri_type);
26486        for val in &self.uri {
26487            __tmp.put_u8(*val);
26488        }
26489        __tmp.put_u8(self.transfer_type);
26490        for val in &self.storage {
26491            __tmp.put_u8(*val);
26492        }
26493        if matches!(version, MavlinkVersion::V2) {
26494            let len = __tmp.len();
26495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26496        } else {
26497            __tmp.len()
26498        }
26499    }
26500}
26501#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26502#[doc = ""]
26503#[doc = "ID: 413"]
26504#[derive(Debug, Clone, PartialEq)]
26505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26507#[cfg_attr(feature = "ts", derive(TS))]
26508#[cfg_attr(feature = "ts", ts(export))]
26509pub struct RESPONSE_EVENT_ERROR_DATA {
26510    #[doc = "Sequence number."]
26511    pub sequence: u16,
26512    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26513    pub sequence_oldest_available: u16,
26514    #[doc = "System ID"]
26515    pub target_system: u8,
26516    #[doc = "Component ID"]
26517    pub target_component: u8,
26518    #[doc = "Error reason."]
26519    pub reason: MavEventErrorReason,
26520}
26521impl RESPONSE_EVENT_ERROR_DATA {
26522    pub const ENCODED_LEN: usize = 7usize;
26523    pub const DEFAULT: Self = Self {
26524        sequence: 0_u16,
26525        sequence_oldest_available: 0_u16,
26526        target_system: 0_u8,
26527        target_component: 0_u8,
26528        reason: MavEventErrorReason::DEFAULT,
26529    };
26530    #[cfg(feature = "arbitrary")]
26531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26532        use arbitrary::{Arbitrary, Unstructured};
26533        let mut buf = [0u8; 1024];
26534        rng.fill_bytes(&mut buf);
26535        let mut unstructured = Unstructured::new(&buf);
26536        Self::arbitrary(&mut unstructured).unwrap_or_default()
26537    }
26538}
26539impl Default for RESPONSE_EVENT_ERROR_DATA {
26540    fn default() -> Self {
26541        Self::DEFAULT.clone()
26542    }
26543}
26544impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26545    type Message = MavMessage;
26546    const ID: u32 = 413u32;
26547    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26548    const EXTRA_CRC: u8 = 77u8;
26549    const ENCODED_LEN: usize = 7usize;
26550    fn deser(
26551        _version: MavlinkVersion,
26552        __input: &[u8],
26553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26554        let avail_len = __input.len();
26555        let mut payload_buf = [0; Self::ENCODED_LEN];
26556        let mut buf = if avail_len < Self::ENCODED_LEN {
26557            payload_buf[0..avail_len].copy_from_slice(__input);
26558            Bytes::new(&payload_buf)
26559        } else {
26560            Bytes::new(__input)
26561        };
26562        let mut __struct = Self::default();
26563        __struct.sequence = buf.get_u16_le();
26564        __struct.sequence_oldest_available = buf.get_u16_le();
26565        __struct.target_system = buf.get_u8();
26566        __struct.target_component = buf.get_u8();
26567        let tmp = buf.get_u8();
26568        __struct.reason =
26569            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26570                enum_type: "MavEventErrorReason",
26571                value: tmp as u64,
26572            })?;
26573        Ok(__struct)
26574    }
26575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26576        let mut __tmp = BytesMut::new(bytes);
26577        #[allow(clippy::absurd_extreme_comparisons)]
26578        #[allow(unused_comparisons)]
26579        if __tmp.remaining() < Self::ENCODED_LEN {
26580            panic!(
26581                "buffer is too small (need {} bytes, but got {})",
26582                Self::ENCODED_LEN,
26583                __tmp.remaining(),
26584            )
26585        }
26586        __tmp.put_u16_le(self.sequence);
26587        __tmp.put_u16_le(self.sequence_oldest_available);
26588        __tmp.put_u8(self.target_system);
26589        __tmp.put_u8(self.target_component);
26590        __tmp.put_u8(self.reason as u8);
26591        if matches!(version, MavlinkVersion::V2) {
26592            let len = __tmp.len();
26593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26594        } else {
26595            __tmp.len()
26596        }
26597    }
26598}
26599#[doc = "Read out the safety zone the MAV currently assumes."]
26600#[doc = ""]
26601#[doc = "ID: 55"]
26602#[derive(Debug, Clone, PartialEq)]
26603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26605#[cfg_attr(feature = "ts", derive(TS))]
26606#[cfg_attr(feature = "ts", ts(export))]
26607pub struct SAFETY_ALLOWED_AREA_DATA {
26608    #[doc = "x position 1 / Latitude 1"]
26609    pub p1x: f32,
26610    #[doc = "y position 1 / Longitude 1"]
26611    pub p1y: f32,
26612    #[doc = "z position 1 / Altitude 1"]
26613    pub p1z: f32,
26614    #[doc = "x position 2 / Latitude 2"]
26615    pub p2x: f32,
26616    #[doc = "y position 2 / Longitude 2"]
26617    pub p2y: f32,
26618    #[doc = "z position 2 / Altitude 2"]
26619    pub p2z: f32,
26620    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26621    pub frame: MavFrame,
26622}
26623impl SAFETY_ALLOWED_AREA_DATA {
26624    pub const ENCODED_LEN: usize = 25usize;
26625    pub const DEFAULT: Self = Self {
26626        p1x: 0.0_f32,
26627        p1y: 0.0_f32,
26628        p1z: 0.0_f32,
26629        p2x: 0.0_f32,
26630        p2y: 0.0_f32,
26631        p2z: 0.0_f32,
26632        frame: MavFrame::DEFAULT,
26633    };
26634    #[cfg(feature = "arbitrary")]
26635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26636        use arbitrary::{Arbitrary, Unstructured};
26637        let mut buf = [0u8; 1024];
26638        rng.fill_bytes(&mut buf);
26639        let mut unstructured = Unstructured::new(&buf);
26640        Self::arbitrary(&mut unstructured).unwrap_or_default()
26641    }
26642}
26643impl Default for SAFETY_ALLOWED_AREA_DATA {
26644    fn default() -> Self {
26645        Self::DEFAULT.clone()
26646    }
26647}
26648impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26649    type Message = MavMessage;
26650    const ID: u32 = 55u32;
26651    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26652    const EXTRA_CRC: u8 = 3u8;
26653    const ENCODED_LEN: usize = 25usize;
26654    fn deser(
26655        _version: MavlinkVersion,
26656        __input: &[u8],
26657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26658        let avail_len = __input.len();
26659        let mut payload_buf = [0; Self::ENCODED_LEN];
26660        let mut buf = if avail_len < Self::ENCODED_LEN {
26661            payload_buf[0..avail_len].copy_from_slice(__input);
26662            Bytes::new(&payload_buf)
26663        } else {
26664            Bytes::new(__input)
26665        };
26666        let mut __struct = Self::default();
26667        __struct.p1x = buf.get_f32_le();
26668        __struct.p1y = buf.get_f32_le();
26669        __struct.p1z = buf.get_f32_le();
26670        __struct.p2x = buf.get_f32_le();
26671        __struct.p2y = buf.get_f32_le();
26672        __struct.p2z = buf.get_f32_le();
26673        let tmp = buf.get_u8();
26674        __struct.frame =
26675            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26676                enum_type: "MavFrame",
26677                value: tmp as u64,
26678            })?;
26679        Ok(__struct)
26680    }
26681    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26682        let mut __tmp = BytesMut::new(bytes);
26683        #[allow(clippy::absurd_extreme_comparisons)]
26684        #[allow(unused_comparisons)]
26685        if __tmp.remaining() < Self::ENCODED_LEN {
26686            panic!(
26687                "buffer is too small (need {} bytes, but got {})",
26688                Self::ENCODED_LEN,
26689                __tmp.remaining(),
26690            )
26691        }
26692        __tmp.put_f32_le(self.p1x);
26693        __tmp.put_f32_le(self.p1y);
26694        __tmp.put_f32_le(self.p1z);
26695        __tmp.put_f32_le(self.p2x);
26696        __tmp.put_f32_le(self.p2y);
26697        __tmp.put_f32_le(self.p2z);
26698        __tmp.put_u8(self.frame as u8);
26699        if matches!(version, MavlinkVersion::V2) {
26700            let len = __tmp.len();
26701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26702        } else {
26703            __tmp.len()
26704        }
26705    }
26706}
26707#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26708#[doc = ""]
26709#[doc = "ID: 54"]
26710#[derive(Debug, Clone, PartialEq)]
26711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26713#[cfg_attr(feature = "ts", derive(TS))]
26714#[cfg_attr(feature = "ts", ts(export))]
26715pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26716    #[doc = "x position 1 / Latitude 1"]
26717    pub p1x: f32,
26718    #[doc = "y position 1 / Longitude 1"]
26719    pub p1y: f32,
26720    #[doc = "z position 1 / Altitude 1"]
26721    pub p1z: f32,
26722    #[doc = "x position 2 / Latitude 2"]
26723    pub p2x: f32,
26724    #[doc = "y position 2 / Longitude 2"]
26725    pub p2y: f32,
26726    #[doc = "z position 2 / Altitude 2"]
26727    pub p2z: f32,
26728    #[doc = "System ID"]
26729    pub target_system: u8,
26730    #[doc = "Component ID"]
26731    pub target_component: u8,
26732    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26733    pub frame: MavFrame,
26734}
26735impl SAFETY_SET_ALLOWED_AREA_DATA {
26736    pub const ENCODED_LEN: usize = 27usize;
26737    pub const DEFAULT: Self = Self {
26738        p1x: 0.0_f32,
26739        p1y: 0.0_f32,
26740        p1z: 0.0_f32,
26741        p2x: 0.0_f32,
26742        p2y: 0.0_f32,
26743        p2z: 0.0_f32,
26744        target_system: 0_u8,
26745        target_component: 0_u8,
26746        frame: MavFrame::DEFAULT,
26747    };
26748    #[cfg(feature = "arbitrary")]
26749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26750        use arbitrary::{Arbitrary, Unstructured};
26751        let mut buf = [0u8; 1024];
26752        rng.fill_bytes(&mut buf);
26753        let mut unstructured = Unstructured::new(&buf);
26754        Self::arbitrary(&mut unstructured).unwrap_or_default()
26755    }
26756}
26757impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26758    fn default() -> Self {
26759        Self::DEFAULT.clone()
26760    }
26761}
26762impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26763    type Message = MavMessage;
26764    const ID: u32 = 54u32;
26765    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26766    const EXTRA_CRC: u8 = 15u8;
26767    const ENCODED_LEN: usize = 27usize;
26768    fn deser(
26769        _version: MavlinkVersion,
26770        __input: &[u8],
26771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26772        let avail_len = __input.len();
26773        let mut payload_buf = [0; Self::ENCODED_LEN];
26774        let mut buf = if avail_len < Self::ENCODED_LEN {
26775            payload_buf[0..avail_len].copy_from_slice(__input);
26776            Bytes::new(&payload_buf)
26777        } else {
26778            Bytes::new(__input)
26779        };
26780        let mut __struct = Self::default();
26781        __struct.p1x = buf.get_f32_le();
26782        __struct.p1y = buf.get_f32_le();
26783        __struct.p1z = buf.get_f32_le();
26784        __struct.p2x = buf.get_f32_le();
26785        __struct.p2y = buf.get_f32_le();
26786        __struct.p2z = buf.get_f32_le();
26787        __struct.target_system = buf.get_u8();
26788        __struct.target_component = buf.get_u8();
26789        let tmp = buf.get_u8();
26790        __struct.frame =
26791            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26792                enum_type: "MavFrame",
26793                value: tmp as u64,
26794            })?;
26795        Ok(__struct)
26796    }
26797    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26798        let mut __tmp = BytesMut::new(bytes);
26799        #[allow(clippy::absurd_extreme_comparisons)]
26800        #[allow(unused_comparisons)]
26801        if __tmp.remaining() < Self::ENCODED_LEN {
26802            panic!(
26803                "buffer is too small (need {} bytes, but got {})",
26804                Self::ENCODED_LEN,
26805                __tmp.remaining(),
26806            )
26807        }
26808        __tmp.put_f32_le(self.p1x);
26809        __tmp.put_f32_le(self.p1y);
26810        __tmp.put_f32_le(self.p1z);
26811        __tmp.put_f32_le(self.p2x);
26812        __tmp.put_f32_le(self.p2y);
26813        __tmp.put_f32_le(self.p2z);
26814        __tmp.put_u8(self.target_system);
26815        __tmp.put_u8(self.target_component);
26816        __tmp.put_u8(self.frame as u8);
26817        if matches!(version, MavlinkVersion::V2) {
26818            let len = __tmp.len();
26819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26820        } else {
26821            __tmp.len()
26822        }
26823    }
26824}
26825#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26826#[doc = ""]
26827#[doc = "ID: 26"]
26828#[derive(Debug, Clone, PartialEq)]
26829#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26830#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26831#[cfg_attr(feature = "ts", derive(TS))]
26832#[cfg_attr(feature = "ts", ts(export))]
26833pub struct SCALED_IMU_DATA {
26834    #[doc = "Timestamp (time since system boot)."]
26835    pub time_boot_ms: u32,
26836    #[doc = "X acceleration"]
26837    pub xacc: i16,
26838    #[doc = "Y acceleration"]
26839    pub yacc: i16,
26840    #[doc = "Z acceleration"]
26841    pub zacc: i16,
26842    #[doc = "Angular speed around X axis"]
26843    pub xgyro: i16,
26844    #[doc = "Angular speed around Y axis"]
26845    pub ygyro: i16,
26846    #[doc = "Angular speed around Z axis"]
26847    pub zgyro: i16,
26848    #[doc = "X Magnetic field"]
26849    pub xmag: i16,
26850    #[doc = "Y Magnetic field"]
26851    pub ymag: i16,
26852    #[doc = "Z Magnetic field"]
26853    pub zmag: i16,
26854    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26856    pub temperature: i16,
26857}
26858impl SCALED_IMU_DATA {
26859    pub const ENCODED_LEN: usize = 24usize;
26860    pub const DEFAULT: Self = Self {
26861        time_boot_ms: 0_u32,
26862        xacc: 0_i16,
26863        yacc: 0_i16,
26864        zacc: 0_i16,
26865        xgyro: 0_i16,
26866        ygyro: 0_i16,
26867        zgyro: 0_i16,
26868        xmag: 0_i16,
26869        ymag: 0_i16,
26870        zmag: 0_i16,
26871        temperature: 0_i16,
26872    };
26873    #[cfg(feature = "arbitrary")]
26874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26875        use arbitrary::{Arbitrary, Unstructured};
26876        let mut buf = [0u8; 1024];
26877        rng.fill_bytes(&mut buf);
26878        let mut unstructured = Unstructured::new(&buf);
26879        Self::arbitrary(&mut unstructured).unwrap_or_default()
26880    }
26881}
26882impl Default for SCALED_IMU_DATA {
26883    fn default() -> Self {
26884        Self::DEFAULT.clone()
26885    }
26886}
26887impl MessageData for SCALED_IMU_DATA {
26888    type Message = MavMessage;
26889    const ID: u32 = 26u32;
26890    const NAME: &'static str = "SCALED_IMU";
26891    const EXTRA_CRC: u8 = 170u8;
26892    const ENCODED_LEN: usize = 24usize;
26893    fn deser(
26894        _version: MavlinkVersion,
26895        __input: &[u8],
26896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26897        let avail_len = __input.len();
26898        let mut payload_buf = [0; Self::ENCODED_LEN];
26899        let mut buf = if avail_len < Self::ENCODED_LEN {
26900            payload_buf[0..avail_len].copy_from_slice(__input);
26901            Bytes::new(&payload_buf)
26902        } else {
26903            Bytes::new(__input)
26904        };
26905        let mut __struct = Self::default();
26906        __struct.time_boot_ms = buf.get_u32_le();
26907        __struct.xacc = buf.get_i16_le();
26908        __struct.yacc = buf.get_i16_le();
26909        __struct.zacc = buf.get_i16_le();
26910        __struct.xgyro = buf.get_i16_le();
26911        __struct.ygyro = buf.get_i16_le();
26912        __struct.zgyro = buf.get_i16_le();
26913        __struct.xmag = buf.get_i16_le();
26914        __struct.ymag = buf.get_i16_le();
26915        __struct.zmag = buf.get_i16_le();
26916        __struct.temperature = buf.get_i16_le();
26917        Ok(__struct)
26918    }
26919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26920        let mut __tmp = BytesMut::new(bytes);
26921        #[allow(clippy::absurd_extreme_comparisons)]
26922        #[allow(unused_comparisons)]
26923        if __tmp.remaining() < Self::ENCODED_LEN {
26924            panic!(
26925                "buffer is too small (need {} bytes, but got {})",
26926                Self::ENCODED_LEN,
26927                __tmp.remaining(),
26928            )
26929        }
26930        __tmp.put_u32_le(self.time_boot_ms);
26931        __tmp.put_i16_le(self.xacc);
26932        __tmp.put_i16_le(self.yacc);
26933        __tmp.put_i16_le(self.zacc);
26934        __tmp.put_i16_le(self.xgyro);
26935        __tmp.put_i16_le(self.ygyro);
26936        __tmp.put_i16_le(self.zgyro);
26937        __tmp.put_i16_le(self.xmag);
26938        __tmp.put_i16_le(self.ymag);
26939        __tmp.put_i16_le(self.zmag);
26940        if matches!(version, MavlinkVersion::V2) {
26941            __tmp.put_i16_le(self.temperature);
26942            let len = __tmp.len();
26943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26944        } else {
26945            __tmp.len()
26946        }
26947    }
26948}
26949#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26950#[doc = ""]
26951#[doc = "ID: 116"]
26952#[derive(Debug, Clone, PartialEq)]
26953#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26954#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26955#[cfg_attr(feature = "ts", derive(TS))]
26956#[cfg_attr(feature = "ts", ts(export))]
26957pub struct SCALED_IMU2_DATA {
26958    #[doc = "Timestamp (time since system boot)."]
26959    pub time_boot_ms: u32,
26960    #[doc = "X acceleration"]
26961    pub xacc: i16,
26962    #[doc = "Y acceleration"]
26963    pub yacc: i16,
26964    #[doc = "Z acceleration"]
26965    pub zacc: i16,
26966    #[doc = "Angular speed around X axis"]
26967    pub xgyro: i16,
26968    #[doc = "Angular speed around Y axis"]
26969    pub ygyro: i16,
26970    #[doc = "Angular speed around Z axis"]
26971    pub zgyro: i16,
26972    #[doc = "X Magnetic field"]
26973    pub xmag: i16,
26974    #[doc = "Y Magnetic field"]
26975    pub ymag: i16,
26976    #[doc = "Z Magnetic field"]
26977    pub zmag: i16,
26978    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26980    pub temperature: i16,
26981}
26982impl SCALED_IMU2_DATA {
26983    pub const ENCODED_LEN: usize = 24usize;
26984    pub const DEFAULT: Self = Self {
26985        time_boot_ms: 0_u32,
26986        xacc: 0_i16,
26987        yacc: 0_i16,
26988        zacc: 0_i16,
26989        xgyro: 0_i16,
26990        ygyro: 0_i16,
26991        zgyro: 0_i16,
26992        xmag: 0_i16,
26993        ymag: 0_i16,
26994        zmag: 0_i16,
26995        temperature: 0_i16,
26996    };
26997    #[cfg(feature = "arbitrary")]
26998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26999        use arbitrary::{Arbitrary, Unstructured};
27000        let mut buf = [0u8; 1024];
27001        rng.fill_bytes(&mut buf);
27002        let mut unstructured = Unstructured::new(&buf);
27003        Self::arbitrary(&mut unstructured).unwrap_or_default()
27004    }
27005}
27006impl Default for SCALED_IMU2_DATA {
27007    fn default() -> Self {
27008        Self::DEFAULT.clone()
27009    }
27010}
27011impl MessageData for SCALED_IMU2_DATA {
27012    type Message = MavMessage;
27013    const ID: u32 = 116u32;
27014    const NAME: &'static str = "SCALED_IMU2";
27015    const EXTRA_CRC: u8 = 76u8;
27016    const ENCODED_LEN: usize = 24usize;
27017    fn deser(
27018        _version: MavlinkVersion,
27019        __input: &[u8],
27020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27021        let avail_len = __input.len();
27022        let mut payload_buf = [0; Self::ENCODED_LEN];
27023        let mut buf = if avail_len < Self::ENCODED_LEN {
27024            payload_buf[0..avail_len].copy_from_slice(__input);
27025            Bytes::new(&payload_buf)
27026        } else {
27027            Bytes::new(__input)
27028        };
27029        let mut __struct = Self::default();
27030        __struct.time_boot_ms = buf.get_u32_le();
27031        __struct.xacc = buf.get_i16_le();
27032        __struct.yacc = buf.get_i16_le();
27033        __struct.zacc = buf.get_i16_le();
27034        __struct.xgyro = buf.get_i16_le();
27035        __struct.ygyro = buf.get_i16_le();
27036        __struct.zgyro = buf.get_i16_le();
27037        __struct.xmag = buf.get_i16_le();
27038        __struct.ymag = buf.get_i16_le();
27039        __struct.zmag = buf.get_i16_le();
27040        __struct.temperature = buf.get_i16_le();
27041        Ok(__struct)
27042    }
27043    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27044        let mut __tmp = BytesMut::new(bytes);
27045        #[allow(clippy::absurd_extreme_comparisons)]
27046        #[allow(unused_comparisons)]
27047        if __tmp.remaining() < Self::ENCODED_LEN {
27048            panic!(
27049                "buffer is too small (need {} bytes, but got {})",
27050                Self::ENCODED_LEN,
27051                __tmp.remaining(),
27052            )
27053        }
27054        __tmp.put_u32_le(self.time_boot_ms);
27055        __tmp.put_i16_le(self.xacc);
27056        __tmp.put_i16_le(self.yacc);
27057        __tmp.put_i16_le(self.zacc);
27058        __tmp.put_i16_le(self.xgyro);
27059        __tmp.put_i16_le(self.ygyro);
27060        __tmp.put_i16_le(self.zgyro);
27061        __tmp.put_i16_le(self.xmag);
27062        __tmp.put_i16_le(self.ymag);
27063        __tmp.put_i16_le(self.zmag);
27064        if matches!(version, MavlinkVersion::V2) {
27065            __tmp.put_i16_le(self.temperature);
27066            let len = __tmp.len();
27067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27068        } else {
27069            __tmp.len()
27070        }
27071    }
27072}
27073#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27074#[doc = ""]
27075#[doc = "ID: 129"]
27076#[derive(Debug, Clone, PartialEq)]
27077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27079#[cfg_attr(feature = "ts", derive(TS))]
27080#[cfg_attr(feature = "ts", ts(export))]
27081pub struct SCALED_IMU3_DATA {
27082    #[doc = "Timestamp (time since system boot)."]
27083    pub time_boot_ms: u32,
27084    #[doc = "X acceleration"]
27085    pub xacc: i16,
27086    #[doc = "Y acceleration"]
27087    pub yacc: i16,
27088    #[doc = "Z acceleration"]
27089    pub zacc: i16,
27090    #[doc = "Angular speed around X axis"]
27091    pub xgyro: i16,
27092    #[doc = "Angular speed around Y axis"]
27093    pub ygyro: i16,
27094    #[doc = "Angular speed around Z axis"]
27095    pub zgyro: i16,
27096    #[doc = "X Magnetic field"]
27097    pub xmag: i16,
27098    #[doc = "Y Magnetic field"]
27099    pub ymag: i16,
27100    #[doc = "Z Magnetic field"]
27101    pub zmag: i16,
27102    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27103    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27104    pub temperature: i16,
27105}
27106impl SCALED_IMU3_DATA {
27107    pub const ENCODED_LEN: usize = 24usize;
27108    pub const DEFAULT: Self = Self {
27109        time_boot_ms: 0_u32,
27110        xacc: 0_i16,
27111        yacc: 0_i16,
27112        zacc: 0_i16,
27113        xgyro: 0_i16,
27114        ygyro: 0_i16,
27115        zgyro: 0_i16,
27116        xmag: 0_i16,
27117        ymag: 0_i16,
27118        zmag: 0_i16,
27119        temperature: 0_i16,
27120    };
27121    #[cfg(feature = "arbitrary")]
27122    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27123        use arbitrary::{Arbitrary, Unstructured};
27124        let mut buf = [0u8; 1024];
27125        rng.fill_bytes(&mut buf);
27126        let mut unstructured = Unstructured::new(&buf);
27127        Self::arbitrary(&mut unstructured).unwrap_or_default()
27128    }
27129}
27130impl Default for SCALED_IMU3_DATA {
27131    fn default() -> Self {
27132        Self::DEFAULT.clone()
27133    }
27134}
27135impl MessageData for SCALED_IMU3_DATA {
27136    type Message = MavMessage;
27137    const ID: u32 = 129u32;
27138    const NAME: &'static str = "SCALED_IMU3";
27139    const EXTRA_CRC: u8 = 46u8;
27140    const ENCODED_LEN: usize = 24usize;
27141    fn deser(
27142        _version: MavlinkVersion,
27143        __input: &[u8],
27144    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27145        let avail_len = __input.len();
27146        let mut payload_buf = [0; Self::ENCODED_LEN];
27147        let mut buf = if avail_len < Self::ENCODED_LEN {
27148            payload_buf[0..avail_len].copy_from_slice(__input);
27149            Bytes::new(&payload_buf)
27150        } else {
27151            Bytes::new(__input)
27152        };
27153        let mut __struct = Self::default();
27154        __struct.time_boot_ms = buf.get_u32_le();
27155        __struct.xacc = buf.get_i16_le();
27156        __struct.yacc = buf.get_i16_le();
27157        __struct.zacc = buf.get_i16_le();
27158        __struct.xgyro = buf.get_i16_le();
27159        __struct.ygyro = buf.get_i16_le();
27160        __struct.zgyro = buf.get_i16_le();
27161        __struct.xmag = buf.get_i16_le();
27162        __struct.ymag = buf.get_i16_le();
27163        __struct.zmag = buf.get_i16_le();
27164        __struct.temperature = buf.get_i16_le();
27165        Ok(__struct)
27166    }
27167    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27168        let mut __tmp = BytesMut::new(bytes);
27169        #[allow(clippy::absurd_extreme_comparisons)]
27170        #[allow(unused_comparisons)]
27171        if __tmp.remaining() < Self::ENCODED_LEN {
27172            panic!(
27173                "buffer is too small (need {} bytes, but got {})",
27174                Self::ENCODED_LEN,
27175                __tmp.remaining(),
27176            )
27177        }
27178        __tmp.put_u32_le(self.time_boot_ms);
27179        __tmp.put_i16_le(self.xacc);
27180        __tmp.put_i16_le(self.yacc);
27181        __tmp.put_i16_le(self.zacc);
27182        __tmp.put_i16_le(self.xgyro);
27183        __tmp.put_i16_le(self.ygyro);
27184        __tmp.put_i16_le(self.zgyro);
27185        __tmp.put_i16_le(self.xmag);
27186        __tmp.put_i16_le(self.ymag);
27187        __tmp.put_i16_le(self.zmag);
27188        if matches!(version, MavlinkVersion::V2) {
27189            __tmp.put_i16_le(self.temperature);
27190            let len = __tmp.len();
27191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27192        } else {
27193            __tmp.len()
27194        }
27195    }
27196}
27197#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27198#[doc = ""]
27199#[doc = "ID: 29"]
27200#[derive(Debug, Clone, PartialEq)]
27201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27203#[cfg_attr(feature = "ts", derive(TS))]
27204#[cfg_attr(feature = "ts", ts(export))]
27205pub struct SCALED_PRESSURE_DATA {
27206    #[doc = "Timestamp (time since system boot)."]
27207    pub time_boot_ms: u32,
27208    #[doc = "Absolute pressure"]
27209    pub press_abs: f32,
27210    #[doc = "Differential pressure 1"]
27211    pub press_diff: f32,
27212    #[doc = "Absolute pressure temperature"]
27213    pub temperature: i16,
27214    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27216    pub temperature_press_diff: i16,
27217}
27218impl SCALED_PRESSURE_DATA {
27219    pub const ENCODED_LEN: usize = 16usize;
27220    pub const DEFAULT: Self = Self {
27221        time_boot_ms: 0_u32,
27222        press_abs: 0.0_f32,
27223        press_diff: 0.0_f32,
27224        temperature: 0_i16,
27225        temperature_press_diff: 0_i16,
27226    };
27227    #[cfg(feature = "arbitrary")]
27228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27229        use arbitrary::{Arbitrary, Unstructured};
27230        let mut buf = [0u8; 1024];
27231        rng.fill_bytes(&mut buf);
27232        let mut unstructured = Unstructured::new(&buf);
27233        Self::arbitrary(&mut unstructured).unwrap_or_default()
27234    }
27235}
27236impl Default for SCALED_PRESSURE_DATA {
27237    fn default() -> Self {
27238        Self::DEFAULT.clone()
27239    }
27240}
27241impl MessageData for SCALED_PRESSURE_DATA {
27242    type Message = MavMessage;
27243    const ID: u32 = 29u32;
27244    const NAME: &'static str = "SCALED_PRESSURE";
27245    const EXTRA_CRC: u8 = 115u8;
27246    const ENCODED_LEN: usize = 16usize;
27247    fn deser(
27248        _version: MavlinkVersion,
27249        __input: &[u8],
27250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27251        let avail_len = __input.len();
27252        let mut payload_buf = [0; Self::ENCODED_LEN];
27253        let mut buf = if avail_len < Self::ENCODED_LEN {
27254            payload_buf[0..avail_len].copy_from_slice(__input);
27255            Bytes::new(&payload_buf)
27256        } else {
27257            Bytes::new(__input)
27258        };
27259        let mut __struct = Self::default();
27260        __struct.time_boot_ms = buf.get_u32_le();
27261        __struct.press_abs = buf.get_f32_le();
27262        __struct.press_diff = buf.get_f32_le();
27263        __struct.temperature = buf.get_i16_le();
27264        __struct.temperature_press_diff = buf.get_i16_le();
27265        Ok(__struct)
27266    }
27267    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27268        let mut __tmp = BytesMut::new(bytes);
27269        #[allow(clippy::absurd_extreme_comparisons)]
27270        #[allow(unused_comparisons)]
27271        if __tmp.remaining() < Self::ENCODED_LEN {
27272            panic!(
27273                "buffer is too small (need {} bytes, but got {})",
27274                Self::ENCODED_LEN,
27275                __tmp.remaining(),
27276            )
27277        }
27278        __tmp.put_u32_le(self.time_boot_ms);
27279        __tmp.put_f32_le(self.press_abs);
27280        __tmp.put_f32_le(self.press_diff);
27281        __tmp.put_i16_le(self.temperature);
27282        if matches!(version, MavlinkVersion::V2) {
27283            __tmp.put_i16_le(self.temperature_press_diff);
27284            let len = __tmp.len();
27285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27286        } else {
27287            __tmp.len()
27288        }
27289    }
27290}
27291#[doc = "Barometer readings for 2nd barometer."]
27292#[doc = ""]
27293#[doc = "ID: 137"]
27294#[derive(Debug, Clone, PartialEq)]
27295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27297#[cfg_attr(feature = "ts", derive(TS))]
27298#[cfg_attr(feature = "ts", ts(export))]
27299pub struct SCALED_PRESSURE2_DATA {
27300    #[doc = "Timestamp (time since system boot)."]
27301    pub time_boot_ms: u32,
27302    #[doc = "Absolute pressure"]
27303    pub press_abs: f32,
27304    #[doc = "Differential pressure"]
27305    pub press_diff: f32,
27306    #[doc = "Absolute pressure temperature"]
27307    pub temperature: i16,
27308    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27309    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27310    pub temperature_press_diff: i16,
27311}
27312impl SCALED_PRESSURE2_DATA {
27313    pub const ENCODED_LEN: usize = 16usize;
27314    pub const DEFAULT: Self = Self {
27315        time_boot_ms: 0_u32,
27316        press_abs: 0.0_f32,
27317        press_diff: 0.0_f32,
27318        temperature: 0_i16,
27319        temperature_press_diff: 0_i16,
27320    };
27321    #[cfg(feature = "arbitrary")]
27322    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27323        use arbitrary::{Arbitrary, Unstructured};
27324        let mut buf = [0u8; 1024];
27325        rng.fill_bytes(&mut buf);
27326        let mut unstructured = Unstructured::new(&buf);
27327        Self::arbitrary(&mut unstructured).unwrap_or_default()
27328    }
27329}
27330impl Default for SCALED_PRESSURE2_DATA {
27331    fn default() -> Self {
27332        Self::DEFAULT.clone()
27333    }
27334}
27335impl MessageData for SCALED_PRESSURE2_DATA {
27336    type Message = MavMessage;
27337    const ID: u32 = 137u32;
27338    const NAME: &'static str = "SCALED_PRESSURE2";
27339    const EXTRA_CRC: u8 = 195u8;
27340    const ENCODED_LEN: usize = 16usize;
27341    fn deser(
27342        _version: MavlinkVersion,
27343        __input: &[u8],
27344    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27345        let avail_len = __input.len();
27346        let mut payload_buf = [0; Self::ENCODED_LEN];
27347        let mut buf = if avail_len < Self::ENCODED_LEN {
27348            payload_buf[0..avail_len].copy_from_slice(__input);
27349            Bytes::new(&payload_buf)
27350        } else {
27351            Bytes::new(__input)
27352        };
27353        let mut __struct = Self::default();
27354        __struct.time_boot_ms = buf.get_u32_le();
27355        __struct.press_abs = buf.get_f32_le();
27356        __struct.press_diff = buf.get_f32_le();
27357        __struct.temperature = buf.get_i16_le();
27358        __struct.temperature_press_diff = buf.get_i16_le();
27359        Ok(__struct)
27360    }
27361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27362        let mut __tmp = BytesMut::new(bytes);
27363        #[allow(clippy::absurd_extreme_comparisons)]
27364        #[allow(unused_comparisons)]
27365        if __tmp.remaining() < Self::ENCODED_LEN {
27366            panic!(
27367                "buffer is too small (need {} bytes, but got {})",
27368                Self::ENCODED_LEN,
27369                __tmp.remaining(),
27370            )
27371        }
27372        __tmp.put_u32_le(self.time_boot_ms);
27373        __tmp.put_f32_le(self.press_abs);
27374        __tmp.put_f32_le(self.press_diff);
27375        __tmp.put_i16_le(self.temperature);
27376        if matches!(version, MavlinkVersion::V2) {
27377            __tmp.put_i16_le(self.temperature_press_diff);
27378            let len = __tmp.len();
27379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27380        } else {
27381            __tmp.len()
27382        }
27383    }
27384}
27385#[doc = "Barometer readings for 3rd barometer."]
27386#[doc = ""]
27387#[doc = "ID: 143"]
27388#[derive(Debug, Clone, PartialEq)]
27389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27391#[cfg_attr(feature = "ts", derive(TS))]
27392#[cfg_attr(feature = "ts", ts(export))]
27393pub struct SCALED_PRESSURE3_DATA {
27394    #[doc = "Timestamp (time since system boot)."]
27395    pub time_boot_ms: u32,
27396    #[doc = "Absolute pressure"]
27397    pub press_abs: f32,
27398    #[doc = "Differential pressure"]
27399    pub press_diff: f32,
27400    #[doc = "Absolute pressure temperature"]
27401    pub temperature: i16,
27402    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27404    pub temperature_press_diff: i16,
27405}
27406impl SCALED_PRESSURE3_DATA {
27407    pub const ENCODED_LEN: usize = 16usize;
27408    pub const DEFAULT: Self = Self {
27409        time_boot_ms: 0_u32,
27410        press_abs: 0.0_f32,
27411        press_diff: 0.0_f32,
27412        temperature: 0_i16,
27413        temperature_press_diff: 0_i16,
27414    };
27415    #[cfg(feature = "arbitrary")]
27416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27417        use arbitrary::{Arbitrary, Unstructured};
27418        let mut buf = [0u8; 1024];
27419        rng.fill_bytes(&mut buf);
27420        let mut unstructured = Unstructured::new(&buf);
27421        Self::arbitrary(&mut unstructured).unwrap_or_default()
27422    }
27423}
27424impl Default for SCALED_PRESSURE3_DATA {
27425    fn default() -> Self {
27426        Self::DEFAULT.clone()
27427    }
27428}
27429impl MessageData for SCALED_PRESSURE3_DATA {
27430    type Message = MavMessage;
27431    const ID: u32 = 143u32;
27432    const NAME: &'static str = "SCALED_PRESSURE3";
27433    const EXTRA_CRC: u8 = 131u8;
27434    const ENCODED_LEN: usize = 16usize;
27435    fn deser(
27436        _version: MavlinkVersion,
27437        __input: &[u8],
27438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27439        let avail_len = __input.len();
27440        let mut payload_buf = [0; Self::ENCODED_LEN];
27441        let mut buf = if avail_len < Self::ENCODED_LEN {
27442            payload_buf[0..avail_len].copy_from_slice(__input);
27443            Bytes::new(&payload_buf)
27444        } else {
27445            Bytes::new(__input)
27446        };
27447        let mut __struct = Self::default();
27448        __struct.time_boot_ms = buf.get_u32_le();
27449        __struct.press_abs = buf.get_f32_le();
27450        __struct.press_diff = buf.get_f32_le();
27451        __struct.temperature = buf.get_i16_le();
27452        __struct.temperature_press_diff = buf.get_i16_le();
27453        Ok(__struct)
27454    }
27455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27456        let mut __tmp = BytesMut::new(bytes);
27457        #[allow(clippy::absurd_extreme_comparisons)]
27458        #[allow(unused_comparisons)]
27459        if __tmp.remaining() < Self::ENCODED_LEN {
27460            panic!(
27461                "buffer is too small (need {} bytes, but got {})",
27462                Self::ENCODED_LEN,
27463                __tmp.remaining(),
27464            )
27465        }
27466        __tmp.put_u32_le(self.time_boot_ms);
27467        __tmp.put_f32_le(self.press_abs);
27468        __tmp.put_f32_le(self.press_diff);
27469        __tmp.put_i16_le(self.temperature);
27470        if matches!(version, MavlinkVersion::V2) {
27471            __tmp.put_i16_le(self.temperature_press_diff);
27472            let len = __tmp.len();
27473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27474        } else {
27475            __tmp.len()
27476        }
27477    }
27478}
27479#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27480#[doc = ""]
27481#[doc = "ID: 126"]
27482#[derive(Debug, Clone, PartialEq)]
27483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27485#[cfg_attr(feature = "ts", derive(TS))]
27486#[cfg_attr(feature = "ts", ts(export))]
27487pub struct SERIAL_CONTROL_DATA {
27488    #[doc = "Baudrate of transfer. Zero means no change."]
27489    pub baudrate: u32,
27490    #[doc = "Timeout for reply data"]
27491    pub timeout: u16,
27492    #[doc = "Serial control device type."]
27493    pub device: SerialControlDev,
27494    #[doc = "Bitmap of serial control flags."]
27495    pub flags: SerialControlFlag,
27496    #[doc = "how many bytes in this transfer"]
27497    pub count: u8,
27498    #[doc = "serial data"]
27499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27501    pub data: [u8; 70],
27502    #[doc = "System ID"]
27503    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27504    pub target_system: u8,
27505    #[doc = "Component ID"]
27506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27507    pub target_component: u8,
27508}
27509impl SERIAL_CONTROL_DATA {
27510    pub const ENCODED_LEN: usize = 81usize;
27511    pub const DEFAULT: Self = Self {
27512        baudrate: 0_u32,
27513        timeout: 0_u16,
27514        device: SerialControlDev::DEFAULT,
27515        flags: SerialControlFlag::DEFAULT,
27516        count: 0_u8,
27517        data: [0_u8; 70usize],
27518        target_system: 0_u8,
27519        target_component: 0_u8,
27520    };
27521    #[cfg(feature = "arbitrary")]
27522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27523        use arbitrary::{Arbitrary, Unstructured};
27524        let mut buf = [0u8; 1024];
27525        rng.fill_bytes(&mut buf);
27526        let mut unstructured = Unstructured::new(&buf);
27527        Self::arbitrary(&mut unstructured).unwrap_or_default()
27528    }
27529}
27530impl Default for SERIAL_CONTROL_DATA {
27531    fn default() -> Self {
27532        Self::DEFAULT.clone()
27533    }
27534}
27535impl MessageData for SERIAL_CONTROL_DATA {
27536    type Message = MavMessage;
27537    const ID: u32 = 126u32;
27538    const NAME: &'static str = "SERIAL_CONTROL";
27539    const EXTRA_CRC: u8 = 220u8;
27540    const ENCODED_LEN: usize = 81usize;
27541    fn deser(
27542        _version: MavlinkVersion,
27543        __input: &[u8],
27544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27545        let avail_len = __input.len();
27546        let mut payload_buf = [0; Self::ENCODED_LEN];
27547        let mut buf = if avail_len < Self::ENCODED_LEN {
27548            payload_buf[0..avail_len].copy_from_slice(__input);
27549            Bytes::new(&payload_buf)
27550        } else {
27551            Bytes::new(__input)
27552        };
27553        let mut __struct = Self::default();
27554        __struct.baudrate = buf.get_u32_le();
27555        __struct.timeout = buf.get_u16_le();
27556        let tmp = buf.get_u8();
27557        __struct.device =
27558            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27559                enum_type: "SerialControlDev",
27560                value: tmp as u64,
27561            })?;
27562        let tmp = buf.get_u8();
27563        __struct.flags = SerialControlFlag::from_bits(tmp).ok_or(
27564            ::mavlink_core::error::ParserError::InvalidFlag {
27565                flag_type: "SerialControlFlag",
27566                value: tmp as u64,
27567            },
27568        )?;
27569        __struct.count = buf.get_u8();
27570        for v in &mut __struct.data {
27571            let val = buf.get_u8();
27572            *v = val;
27573        }
27574        __struct.target_system = buf.get_u8();
27575        __struct.target_component = buf.get_u8();
27576        Ok(__struct)
27577    }
27578    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27579        let mut __tmp = BytesMut::new(bytes);
27580        #[allow(clippy::absurd_extreme_comparisons)]
27581        #[allow(unused_comparisons)]
27582        if __tmp.remaining() < Self::ENCODED_LEN {
27583            panic!(
27584                "buffer is too small (need {} bytes, but got {})",
27585                Self::ENCODED_LEN,
27586                __tmp.remaining(),
27587            )
27588        }
27589        __tmp.put_u32_le(self.baudrate);
27590        __tmp.put_u16_le(self.timeout);
27591        __tmp.put_u8(self.device as u8);
27592        __tmp.put_u8(self.flags.bits());
27593        __tmp.put_u8(self.count);
27594        for val in &self.data {
27595            __tmp.put_u8(*val);
27596        }
27597        if matches!(version, MavlinkVersion::V2) {
27598            __tmp.put_u8(self.target_system);
27599            __tmp.put_u8(self.target_component);
27600            let len = __tmp.len();
27601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27602        } else {
27603            __tmp.len()
27604        }
27605    }
27606}
27607#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
27608#[doc = ""]
27609#[doc = "ID: 36"]
27610#[derive(Debug, Clone, PartialEq)]
27611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27613#[cfg_attr(feature = "ts", derive(TS))]
27614#[cfg_attr(feature = "ts", ts(export))]
27615pub struct SERVO_OUTPUT_RAW_DATA {
27616    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27617    pub time_usec: u32,
27618    #[doc = "Servo output 1 value"]
27619    pub servo1_raw: u16,
27620    #[doc = "Servo output 2 value"]
27621    pub servo2_raw: u16,
27622    #[doc = "Servo output 3 value"]
27623    pub servo3_raw: u16,
27624    #[doc = "Servo output 4 value"]
27625    pub servo4_raw: u16,
27626    #[doc = "Servo output 5 value"]
27627    pub servo5_raw: u16,
27628    #[doc = "Servo output 6 value"]
27629    pub servo6_raw: u16,
27630    #[doc = "Servo output 7 value"]
27631    pub servo7_raw: u16,
27632    #[doc = "Servo output 8 value"]
27633    pub servo8_raw: u16,
27634    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
27635    pub port: u8,
27636    #[doc = "Servo output 9 value"]
27637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27638    pub servo9_raw: u16,
27639    #[doc = "Servo output 10 value"]
27640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27641    pub servo10_raw: u16,
27642    #[doc = "Servo output 11 value"]
27643    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27644    pub servo11_raw: u16,
27645    #[doc = "Servo output 12 value"]
27646    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27647    pub servo12_raw: u16,
27648    #[doc = "Servo output 13 value"]
27649    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27650    pub servo13_raw: u16,
27651    #[doc = "Servo output 14 value"]
27652    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27653    pub servo14_raw: u16,
27654    #[doc = "Servo output 15 value"]
27655    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27656    pub servo15_raw: u16,
27657    #[doc = "Servo output 16 value"]
27658    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27659    pub servo16_raw: u16,
27660}
27661impl SERVO_OUTPUT_RAW_DATA {
27662    pub const ENCODED_LEN: usize = 37usize;
27663    pub const DEFAULT: Self = Self {
27664        time_usec: 0_u32,
27665        servo1_raw: 0_u16,
27666        servo2_raw: 0_u16,
27667        servo3_raw: 0_u16,
27668        servo4_raw: 0_u16,
27669        servo5_raw: 0_u16,
27670        servo6_raw: 0_u16,
27671        servo7_raw: 0_u16,
27672        servo8_raw: 0_u16,
27673        port: 0_u8,
27674        servo9_raw: 0_u16,
27675        servo10_raw: 0_u16,
27676        servo11_raw: 0_u16,
27677        servo12_raw: 0_u16,
27678        servo13_raw: 0_u16,
27679        servo14_raw: 0_u16,
27680        servo15_raw: 0_u16,
27681        servo16_raw: 0_u16,
27682    };
27683    #[cfg(feature = "arbitrary")]
27684    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27685        use arbitrary::{Arbitrary, Unstructured};
27686        let mut buf = [0u8; 1024];
27687        rng.fill_bytes(&mut buf);
27688        let mut unstructured = Unstructured::new(&buf);
27689        Self::arbitrary(&mut unstructured).unwrap_or_default()
27690    }
27691}
27692impl Default for SERVO_OUTPUT_RAW_DATA {
27693    fn default() -> Self {
27694        Self::DEFAULT.clone()
27695    }
27696}
27697impl MessageData for SERVO_OUTPUT_RAW_DATA {
27698    type Message = MavMessage;
27699    const ID: u32 = 36u32;
27700    const NAME: &'static str = "SERVO_OUTPUT_RAW";
27701    const EXTRA_CRC: u8 = 222u8;
27702    const ENCODED_LEN: usize = 37usize;
27703    fn deser(
27704        _version: MavlinkVersion,
27705        __input: &[u8],
27706    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27707        let avail_len = __input.len();
27708        let mut payload_buf = [0; Self::ENCODED_LEN];
27709        let mut buf = if avail_len < Self::ENCODED_LEN {
27710            payload_buf[0..avail_len].copy_from_slice(__input);
27711            Bytes::new(&payload_buf)
27712        } else {
27713            Bytes::new(__input)
27714        };
27715        let mut __struct = Self::default();
27716        __struct.time_usec = buf.get_u32_le();
27717        __struct.servo1_raw = buf.get_u16_le();
27718        __struct.servo2_raw = buf.get_u16_le();
27719        __struct.servo3_raw = buf.get_u16_le();
27720        __struct.servo4_raw = buf.get_u16_le();
27721        __struct.servo5_raw = buf.get_u16_le();
27722        __struct.servo6_raw = buf.get_u16_le();
27723        __struct.servo7_raw = buf.get_u16_le();
27724        __struct.servo8_raw = buf.get_u16_le();
27725        __struct.port = buf.get_u8();
27726        __struct.servo9_raw = buf.get_u16_le();
27727        __struct.servo10_raw = buf.get_u16_le();
27728        __struct.servo11_raw = buf.get_u16_le();
27729        __struct.servo12_raw = buf.get_u16_le();
27730        __struct.servo13_raw = buf.get_u16_le();
27731        __struct.servo14_raw = buf.get_u16_le();
27732        __struct.servo15_raw = buf.get_u16_le();
27733        __struct.servo16_raw = buf.get_u16_le();
27734        Ok(__struct)
27735    }
27736    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27737        let mut __tmp = BytesMut::new(bytes);
27738        #[allow(clippy::absurd_extreme_comparisons)]
27739        #[allow(unused_comparisons)]
27740        if __tmp.remaining() < Self::ENCODED_LEN {
27741            panic!(
27742                "buffer is too small (need {} bytes, but got {})",
27743                Self::ENCODED_LEN,
27744                __tmp.remaining(),
27745            )
27746        }
27747        __tmp.put_u32_le(self.time_usec);
27748        __tmp.put_u16_le(self.servo1_raw);
27749        __tmp.put_u16_le(self.servo2_raw);
27750        __tmp.put_u16_le(self.servo3_raw);
27751        __tmp.put_u16_le(self.servo4_raw);
27752        __tmp.put_u16_le(self.servo5_raw);
27753        __tmp.put_u16_le(self.servo6_raw);
27754        __tmp.put_u16_le(self.servo7_raw);
27755        __tmp.put_u16_le(self.servo8_raw);
27756        __tmp.put_u8(self.port);
27757        if matches!(version, MavlinkVersion::V2) {
27758            __tmp.put_u16_le(self.servo9_raw);
27759            __tmp.put_u16_le(self.servo10_raw);
27760            __tmp.put_u16_le(self.servo11_raw);
27761            __tmp.put_u16_le(self.servo12_raw);
27762            __tmp.put_u16_le(self.servo13_raw);
27763            __tmp.put_u16_le(self.servo14_raw);
27764            __tmp.put_u16_le(self.servo15_raw);
27765            __tmp.put_u16_le(self.servo16_raw);
27766            let len = __tmp.len();
27767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27768        } else {
27769            __tmp.len()
27770        }
27771    }
27772}
27773#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
27774#[doc = ""]
27775#[doc = "ID: 256"]
27776#[derive(Debug, Clone, PartialEq)]
27777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27779#[cfg_attr(feature = "ts", derive(TS))]
27780#[cfg_attr(feature = "ts", ts(export))]
27781pub struct SETUP_SIGNING_DATA {
27782    #[doc = "initial timestamp"]
27783    pub initial_timestamp: u64,
27784    #[doc = "system id of the target"]
27785    pub target_system: u8,
27786    #[doc = "component ID of the target"]
27787    pub target_component: u8,
27788    #[doc = "signing key"]
27789    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27790    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27791    pub secret_key: [u8; 32],
27792}
27793impl SETUP_SIGNING_DATA {
27794    pub const ENCODED_LEN: usize = 42usize;
27795    pub const DEFAULT: Self = Self {
27796        initial_timestamp: 0_u64,
27797        target_system: 0_u8,
27798        target_component: 0_u8,
27799        secret_key: [0_u8; 32usize],
27800    };
27801    #[cfg(feature = "arbitrary")]
27802    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27803        use arbitrary::{Arbitrary, Unstructured};
27804        let mut buf = [0u8; 1024];
27805        rng.fill_bytes(&mut buf);
27806        let mut unstructured = Unstructured::new(&buf);
27807        Self::arbitrary(&mut unstructured).unwrap_or_default()
27808    }
27809}
27810impl Default for SETUP_SIGNING_DATA {
27811    fn default() -> Self {
27812        Self::DEFAULT.clone()
27813    }
27814}
27815impl MessageData for SETUP_SIGNING_DATA {
27816    type Message = MavMessage;
27817    const ID: u32 = 256u32;
27818    const NAME: &'static str = "SETUP_SIGNING";
27819    const EXTRA_CRC: u8 = 71u8;
27820    const ENCODED_LEN: usize = 42usize;
27821    fn deser(
27822        _version: MavlinkVersion,
27823        __input: &[u8],
27824    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27825        let avail_len = __input.len();
27826        let mut payload_buf = [0; Self::ENCODED_LEN];
27827        let mut buf = if avail_len < Self::ENCODED_LEN {
27828            payload_buf[0..avail_len].copy_from_slice(__input);
27829            Bytes::new(&payload_buf)
27830        } else {
27831            Bytes::new(__input)
27832        };
27833        let mut __struct = Self::default();
27834        __struct.initial_timestamp = buf.get_u64_le();
27835        __struct.target_system = buf.get_u8();
27836        __struct.target_component = buf.get_u8();
27837        for v in &mut __struct.secret_key {
27838            let val = buf.get_u8();
27839            *v = val;
27840        }
27841        Ok(__struct)
27842    }
27843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27844        let mut __tmp = BytesMut::new(bytes);
27845        #[allow(clippy::absurd_extreme_comparisons)]
27846        #[allow(unused_comparisons)]
27847        if __tmp.remaining() < Self::ENCODED_LEN {
27848            panic!(
27849                "buffer is too small (need {} bytes, but got {})",
27850                Self::ENCODED_LEN,
27851                __tmp.remaining(),
27852            )
27853        }
27854        __tmp.put_u64_le(self.initial_timestamp);
27855        __tmp.put_u8(self.target_system);
27856        __tmp.put_u8(self.target_component);
27857        for val in &self.secret_key {
27858            __tmp.put_u8(*val);
27859        }
27860        if matches!(version, MavlinkVersion::V2) {
27861            let len = __tmp.len();
27862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27863        } else {
27864            __tmp.len()
27865        }
27866    }
27867}
27868#[doc = "Set the vehicle attitude and body angular rates."]
27869#[doc = ""]
27870#[doc = "ID: 139"]
27871#[derive(Debug, Clone, PartialEq)]
27872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27874#[cfg_attr(feature = "ts", derive(TS))]
27875#[cfg_attr(feature = "ts", ts(export))]
27876pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
27877    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27878    pub time_usec: u64,
27879    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
27880    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27881    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27882    pub controls: [f32; 8],
27883    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
27884    pub group_mlx: u8,
27885    #[doc = "System ID"]
27886    pub target_system: u8,
27887    #[doc = "Component ID"]
27888    pub target_component: u8,
27889}
27890impl SET_ACTUATOR_CONTROL_TARGET_DATA {
27891    pub const ENCODED_LEN: usize = 43usize;
27892    pub const DEFAULT: Self = Self {
27893        time_usec: 0_u64,
27894        controls: [0.0_f32; 8usize],
27895        group_mlx: 0_u8,
27896        target_system: 0_u8,
27897        target_component: 0_u8,
27898    };
27899    #[cfg(feature = "arbitrary")]
27900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27901        use arbitrary::{Arbitrary, Unstructured};
27902        let mut buf = [0u8; 1024];
27903        rng.fill_bytes(&mut buf);
27904        let mut unstructured = Unstructured::new(&buf);
27905        Self::arbitrary(&mut unstructured).unwrap_or_default()
27906    }
27907}
27908impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
27909    fn default() -> Self {
27910        Self::DEFAULT.clone()
27911    }
27912}
27913impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
27914    type Message = MavMessage;
27915    const ID: u32 = 139u32;
27916    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
27917    const EXTRA_CRC: u8 = 168u8;
27918    const ENCODED_LEN: usize = 43usize;
27919    fn deser(
27920        _version: MavlinkVersion,
27921        __input: &[u8],
27922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27923        let avail_len = __input.len();
27924        let mut payload_buf = [0; Self::ENCODED_LEN];
27925        let mut buf = if avail_len < Self::ENCODED_LEN {
27926            payload_buf[0..avail_len].copy_from_slice(__input);
27927            Bytes::new(&payload_buf)
27928        } else {
27929            Bytes::new(__input)
27930        };
27931        let mut __struct = Self::default();
27932        __struct.time_usec = buf.get_u64_le();
27933        for v in &mut __struct.controls {
27934            let val = buf.get_f32_le();
27935            *v = val;
27936        }
27937        __struct.group_mlx = buf.get_u8();
27938        __struct.target_system = buf.get_u8();
27939        __struct.target_component = buf.get_u8();
27940        Ok(__struct)
27941    }
27942    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27943        let mut __tmp = BytesMut::new(bytes);
27944        #[allow(clippy::absurd_extreme_comparisons)]
27945        #[allow(unused_comparisons)]
27946        if __tmp.remaining() < Self::ENCODED_LEN {
27947            panic!(
27948                "buffer is too small (need {} bytes, but got {})",
27949                Self::ENCODED_LEN,
27950                __tmp.remaining(),
27951            )
27952        }
27953        __tmp.put_u64_le(self.time_usec);
27954        for val in &self.controls {
27955            __tmp.put_f32_le(*val);
27956        }
27957        __tmp.put_u8(self.group_mlx);
27958        __tmp.put_u8(self.target_system);
27959        __tmp.put_u8(self.target_component);
27960        if matches!(version, MavlinkVersion::V2) {
27961            let len = __tmp.len();
27962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27963        } else {
27964            __tmp.len()
27965        }
27966    }
27967}
27968#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
27969#[doc = ""]
27970#[doc = "ID: 82"]
27971#[derive(Debug, Clone, PartialEq)]
27972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27974#[cfg_attr(feature = "ts", derive(TS))]
27975#[cfg_attr(feature = "ts", ts(export))]
27976pub struct SET_ATTITUDE_TARGET_DATA {
27977    #[doc = "Timestamp (time since system boot)."]
27978    pub time_boot_ms: u32,
27979    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
27980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27981    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27982    pub q: [f32; 4],
27983    #[doc = "Body roll rate"]
27984    pub body_roll_rate: f32,
27985    #[doc = "Body pitch rate"]
27986    pub body_pitch_rate: f32,
27987    #[doc = "Body yaw rate"]
27988    pub body_yaw_rate: f32,
27989    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
27990    pub thrust: f32,
27991    #[doc = "System ID"]
27992    pub target_system: u8,
27993    #[doc = "Component ID"]
27994    pub target_component: u8,
27995    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27996    pub type_mask: AttitudeTargetTypemask,
27997    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
27998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27999    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28000    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28001    pub thrust_body: [f32; 3],
28002}
28003impl SET_ATTITUDE_TARGET_DATA {
28004    pub const ENCODED_LEN: usize = 51usize;
28005    pub const DEFAULT: Self = Self {
28006        time_boot_ms: 0_u32,
28007        q: [0.0_f32; 4usize],
28008        body_roll_rate: 0.0_f32,
28009        body_pitch_rate: 0.0_f32,
28010        body_yaw_rate: 0.0_f32,
28011        thrust: 0.0_f32,
28012        target_system: 0_u8,
28013        target_component: 0_u8,
28014        type_mask: AttitudeTargetTypemask::DEFAULT,
28015        thrust_body: [0.0_f32; 3usize],
28016    };
28017    #[cfg(feature = "arbitrary")]
28018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28019        use arbitrary::{Arbitrary, Unstructured};
28020        let mut buf = [0u8; 1024];
28021        rng.fill_bytes(&mut buf);
28022        let mut unstructured = Unstructured::new(&buf);
28023        Self::arbitrary(&mut unstructured).unwrap_or_default()
28024    }
28025}
28026impl Default for SET_ATTITUDE_TARGET_DATA {
28027    fn default() -> Self {
28028        Self::DEFAULT.clone()
28029    }
28030}
28031impl MessageData for SET_ATTITUDE_TARGET_DATA {
28032    type Message = MavMessage;
28033    const ID: u32 = 82u32;
28034    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28035    const EXTRA_CRC: u8 = 49u8;
28036    const ENCODED_LEN: usize = 51usize;
28037    fn deser(
28038        _version: MavlinkVersion,
28039        __input: &[u8],
28040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28041        let avail_len = __input.len();
28042        let mut payload_buf = [0; Self::ENCODED_LEN];
28043        let mut buf = if avail_len < Self::ENCODED_LEN {
28044            payload_buf[0..avail_len].copy_from_slice(__input);
28045            Bytes::new(&payload_buf)
28046        } else {
28047            Bytes::new(__input)
28048        };
28049        let mut __struct = Self::default();
28050        __struct.time_boot_ms = buf.get_u32_le();
28051        for v in &mut __struct.q {
28052            let val = buf.get_f32_le();
28053            *v = val;
28054        }
28055        __struct.body_roll_rate = buf.get_f32_le();
28056        __struct.body_pitch_rate = buf.get_f32_le();
28057        __struct.body_yaw_rate = buf.get_f32_le();
28058        __struct.thrust = buf.get_f32_le();
28059        __struct.target_system = buf.get_u8();
28060        __struct.target_component = buf.get_u8();
28061        let tmp = buf.get_u8();
28062        __struct.type_mask = AttitudeTargetTypemask::from_bits(tmp).ok_or(
28063            ::mavlink_core::error::ParserError::InvalidFlag {
28064                flag_type: "AttitudeTargetTypemask",
28065                value: tmp as u64,
28066            },
28067        )?;
28068        for v in &mut __struct.thrust_body {
28069            let val = buf.get_f32_le();
28070            *v = val;
28071        }
28072        Ok(__struct)
28073    }
28074    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28075        let mut __tmp = BytesMut::new(bytes);
28076        #[allow(clippy::absurd_extreme_comparisons)]
28077        #[allow(unused_comparisons)]
28078        if __tmp.remaining() < Self::ENCODED_LEN {
28079            panic!(
28080                "buffer is too small (need {} bytes, but got {})",
28081                Self::ENCODED_LEN,
28082                __tmp.remaining(),
28083            )
28084        }
28085        __tmp.put_u32_le(self.time_boot_ms);
28086        for val in &self.q {
28087            __tmp.put_f32_le(*val);
28088        }
28089        __tmp.put_f32_le(self.body_roll_rate);
28090        __tmp.put_f32_le(self.body_pitch_rate);
28091        __tmp.put_f32_le(self.body_yaw_rate);
28092        __tmp.put_f32_le(self.thrust);
28093        __tmp.put_u8(self.target_system);
28094        __tmp.put_u8(self.target_component);
28095        __tmp.put_u8(self.type_mask.bits());
28096        if matches!(version, MavlinkVersion::V2) {
28097            for val in &self.thrust_body {
28098                __tmp.put_f32_le(*val);
28099            }
28100            let len = __tmp.len();
28101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28102        } else {
28103            __tmp.len()
28104        }
28105    }
28106}
28107#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28108#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28109#[doc = ""]
28110#[doc = "ID: 48"]
28111#[derive(Debug, Clone, PartialEq)]
28112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28113#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28114#[cfg_attr(feature = "ts", derive(TS))]
28115#[cfg_attr(feature = "ts", ts(export))]
28116pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28117    #[doc = "Latitude (WGS84)"]
28118    pub latitude: i32,
28119    #[doc = "Longitude (WGS84)"]
28120    pub longitude: i32,
28121    #[doc = "Altitude (MSL). Positive for up."]
28122    pub altitude: i32,
28123    #[doc = "System ID"]
28124    pub target_system: u8,
28125    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28126    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28127    pub time_usec: u64,
28128}
28129impl SET_GPS_GLOBAL_ORIGIN_DATA {
28130    pub const ENCODED_LEN: usize = 21usize;
28131    pub const DEFAULT: Self = Self {
28132        latitude: 0_i32,
28133        longitude: 0_i32,
28134        altitude: 0_i32,
28135        target_system: 0_u8,
28136        time_usec: 0_u64,
28137    };
28138    #[cfg(feature = "arbitrary")]
28139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28140        use arbitrary::{Arbitrary, Unstructured};
28141        let mut buf = [0u8; 1024];
28142        rng.fill_bytes(&mut buf);
28143        let mut unstructured = Unstructured::new(&buf);
28144        Self::arbitrary(&mut unstructured).unwrap_or_default()
28145    }
28146}
28147impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28148    fn default() -> Self {
28149        Self::DEFAULT.clone()
28150    }
28151}
28152impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28153    type Message = MavMessage;
28154    const ID: u32 = 48u32;
28155    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28156    const EXTRA_CRC: u8 = 41u8;
28157    const ENCODED_LEN: usize = 21usize;
28158    fn deser(
28159        _version: MavlinkVersion,
28160        __input: &[u8],
28161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28162        let avail_len = __input.len();
28163        let mut payload_buf = [0; Self::ENCODED_LEN];
28164        let mut buf = if avail_len < Self::ENCODED_LEN {
28165            payload_buf[0..avail_len].copy_from_slice(__input);
28166            Bytes::new(&payload_buf)
28167        } else {
28168            Bytes::new(__input)
28169        };
28170        let mut __struct = Self::default();
28171        __struct.latitude = buf.get_i32_le();
28172        __struct.longitude = buf.get_i32_le();
28173        __struct.altitude = buf.get_i32_le();
28174        __struct.target_system = buf.get_u8();
28175        __struct.time_usec = buf.get_u64_le();
28176        Ok(__struct)
28177    }
28178    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28179        let mut __tmp = BytesMut::new(bytes);
28180        #[allow(clippy::absurd_extreme_comparisons)]
28181        #[allow(unused_comparisons)]
28182        if __tmp.remaining() < Self::ENCODED_LEN {
28183            panic!(
28184                "buffer is too small (need {} bytes, but got {})",
28185                Self::ENCODED_LEN,
28186                __tmp.remaining(),
28187            )
28188        }
28189        __tmp.put_i32_le(self.latitude);
28190        __tmp.put_i32_le(self.longitude);
28191        __tmp.put_i32_le(self.altitude);
28192        __tmp.put_u8(self.target_system);
28193        if matches!(version, MavlinkVersion::V2) {
28194            __tmp.put_u64_le(self.time_usec);
28195            let len = __tmp.len();
28196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28197        } else {
28198            __tmp.len()
28199        }
28200    }
28201}
28202#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28203#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28204#[doc = ""]
28205#[doc = "ID: 243"]
28206#[derive(Debug, Clone, PartialEq)]
28207#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28209#[cfg_attr(feature = "ts", derive(TS))]
28210#[cfg_attr(feature = "ts", ts(export))]
28211pub struct SET_HOME_POSITION_DATA {
28212    #[doc = "Latitude (WGS84)"]
28213    pub latitude: i32,
28214    #[doc = "Longitude (WGS84)"]
28215    pub longitude: i32,
28216    #[doc = "Altitude (MSL). Positive for up."]
28217    pub altitude: i32,
28218    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28219    pub x: f32,
28220    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28221    pub y: f32,
28222    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28223    pub z: f32,
28224    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28225    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28226    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28227    pub q: [f32; 4],
28228    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28229    pub approach_x: f32,
28230    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28231    pub approach_y: f32,
28232    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28233    pub approach_z: f32,
28234    #[doc = "System ID."]
28235    pub target_system: u8,
28236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28237    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28238    pub time_usec: u64,
28239}
28240impl SET_HOME_POSITION_DATA {
28241    pub const ENCODED_LEN: usize = 61usize;
28242    pub const DEFAULT: Self = Self {
28243        latitude: 0_i32,
28244        longitude: 0_i32,
28245        altitude: 0_i32,
28246        x: 0.0_f32,
28247        y: 0.0_f32,
28248        z: 0.0_f32,
28249        q: [0.0_f32; 4usize],
28250        approach_x: 0.0_f32,
28251        approach_y: 0.0_f32,
28252        approach_z: 0.0_f32,
28253        target_system: 0_u8,
28254        time_usec: 0_u64,
28255    };
28256    #[cfg(feature = "arbitrary")]
28257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28258        use arbitrary::{Arbitrary, Unstructured};
28259        let mut buf = [0u8; 1024];
28260        rng.fill_bytes(&mut buf);
28261        let mut unstructured = Unstructured::new(&buf);
28262        Self::arbitrary(&mut unstructured).unwrap_or_default()
28263    }
28264}
28265impl Default for SET_HOME_POSITION_DATA {
28266    fn default() -> Self {
28267        Self::DEFAULT.clone()
28268    }
28269}
28270impl MessageData for SET_HOME_POSITION_DATA {
28271    type Message = MavMessage;
28272    const ID: u32 = 243u32;
28273    const NAME: &'static str = "SET_HOME_POSITION";
28274    const EXTRA_CRC: u8 = 85u8;
28275    const ENCODED_LEN: usize = 61usize;
28276    fn deser(
28277        _version: MavlinkVersion,
28278        __input: &[u8],
28279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28280        let avail_len = __input.len();
28281        let mut payload_buf = [0; Self::ENCODED_LEN];
28282        let mut buf = if avail_len < Self::ENCODED_LEN {
28283            payload_buf[0..avail_len].copy_from_slice(__input);
28284            Bytes::new(&payload_buf)
28285        } else {
28286            Bytes::new(__input)
28287        };
28288        let mut __struct = Self::default();
28289        __struct.latitude = buf.get_i32_le();
28290        __struct.longitude = buf.get_i32_le();
28291        __struct.altitude = buf.get_i32_le();
28292        __struct.x = buf.get_f32_le();
28293        __struct.y = buf.get_f32_le();
28294        __struct.z = buf.get_f32_le();
28295        for v in &mut __struct.q {
28296            let val = buf.get_f32_le();
28297            *v = val;
28298        }
28299        __struct.approach_x = buf.get_f32_le();
28300        __struct.approach_y = buf.get_f32_le();
28301        __struct.approach_z = buf.get_f32_le();
28302        __struct.target_system = buf.get_u8();
28303        __struct.time_usec = buf.get_u64_le();
28304        Ok(__struct)
28305    }
28306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28307        let mut __tmp = BytesMut::new(bytes);
28308        #[allow(clippy::absurd_extreme_comparisons)]
28309        #[allow(unused_comparisons)]
28310        if __tmp.remaining() < Self::ENCODED_LEN {
28311            panic!(
28312                "buffer is too small (need {} bytes, but got {})",
28313                Self::ENCODED_LEN,
28314                __tmp.remaining(),
28315            )
28316        }
28317        __tmp.put_i32_le(self.latitude);
28318        __tmp.put_i32_le(self.longitude);
28319        __tmp.put_i32_le(self.altitude);
28320        __tmp.put_f32_le(self.x);
28321        __tmp.put_f32_le(self.y);
28322        __tmp.put_f32_le(self.z);
28323        for val in &self.q {
28324            __tmp.put_f32_le(*val);
28325        }
28326        __tmp.put_f32_le(self.approach_x);
28327        __tmp.put_f32_le(self.approach_y);
28328        __tmp.put_f32_le(self.approach_z);
28329        __tmp.put_u8(self.target_system);
28330        if matches!(version, MavlinkVersion::V2) {
28331            __tmp.put_u64_le(self.time_usec);
28332            let len = __tmp.len();
28333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28334        } else {
28335            __tmp.len()
28336        }
28337    }
28338}
28339#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28340#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28341#[doc = ""]
28342#[doc = "ID: 11"]
28343#[derive(Debug, Clone, PartialEq)]
28344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28346#[cfg_attr(feature = "ts", derive(TS))]
28347#[cfg_attr(feature = "ts", ts(export))]
28348pub struct SET_MODE_DATA {
28349    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28350    pub custom_mode: u32,
28351    #[doc = "The system setting the mode"]
28352    pub target_system: u8,
28353    #[doc = "The new base mode."]
28354    pub base_mode: MavMode,
28355}
28356impl SET_MODE_DATA {
28357    pub const ENCODED_LEN: usize = 6usize;
28358    pub const DEFAULT: Self = Self {
28359        custom_mode: 0_u32,
28360        target_system: 0_u8,
28361        base_mode: MavMode::DEFAULT,
28362    };
28363    #[cfg(feature = "arbitrary")]
28364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28365        use arbitrary::{Arbitrary, Unstructured};
28366        let mut buf = [0u8; 1024];
28367        rng.fill_bytes(&mut buf);
28368        let mut unstructured = Unstructured::new(&buf);
28369        Self::arbitrary(&mut unstructured).unwrap_or_default()
28370    }
28371}
28372impl Default for SET_MODE_DATA {
28373    fn default() -> Self {
28374        Self::DEFAULT.clone()
28375    }
28376}
28377impl MessageData for SET_MODE_DATA {
28378    type Message = MavMessage;
28379    const ID: u32 = 11u32;
28380    const NAME: &'static str = "SET_MODE";
28381    const EXTRA_CRC: u8 = 89u8;
28382    const ENCODED_LEN: usize = 6usize;
28383    fn deser(
28384        _version: MavlinkVersion,
28385        __input: &[u8],
28386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28387        let avail_len = __input.len();
28388        let mut payload_buf = [0; Self::ENCODED_LEN];
28389        let mut buf = if avail_len < Self::ENCODED_LEN {
28390            payload_buf[0..avail_len].copy_from_slice(__input);
28391            Bytes::new(&payload_buf)
28392        } else {
28393            Bytes::new(__input)
28394        };
28395        let mut __struct = Self::default();
28396        __struct.custom_mode = buf.get_u32_le();
28397        __struct.target_system = buf.get_u8();
28398        let tmp = buf.get_u8();
28399        __struct.base_mode =
28400            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28401                enum_type: "MavMode",
28402                value: tmp as u64,
28403            })?;
28404        Ok(__struct)
28405    }
28406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28407        let mut __tmp = BytesMut::new(bytes);
28408        #[allow(clippy::absurd_extreme_comparisons)]
28409        #[allow(unused_comparisons)]
28410        if __tmp.remaining() < Self::ENCODED_LEN {
28411            panic!(
28412                "buffer is too small (need {} bytes, but got {})",
28413                Self::ENCODED_LEN,
28414                __tmp.remaining(),
28415            )
28416        }
28417        __tmp.put_u32_le(self.custom_mode);
28418        __tmp.put_u8(self.target_system);
28419        __tmp.put_u8(self.base_mode as u8);
28420        if matches!(version, MavlinkVersion::V2) {
28421            let len = __tmp.len();
28422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28423        } else {
28424            __tmp.len()
28425        }
28426    }
28427}
28428#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
28429#[doc = ""]
28430#[doc = "ID: 86"]
28431#[derive(Debug, Clone, PartialEq)]
28432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28434#[cfg_attr(feature = "ts", derive(TS))]
28435#[cfg_attr(feature = "ts", ts(export))]
28436pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
28437    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
28438    pub time_boot_ms: u32,
28439    #[doc = "Latitude in WGS84 frame"]
28440    pub lat_int: i32,
28441    #[doc = "Longitude in WGS84 frame"]
28442    pub lon_int: i32,
28443    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
28444    pub alt: f32,
28445    #[doc = "X velocity in NED frame"]
28446    pub vx: f32,
28447    #[doc = "Y velocity in NED frame"]
28448    pub vy: f32,
28449    #[doc = "Z velocity in NED frame"]
28450    pub vz: f32,
28451    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28452    pub afx: f32,
28453    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28454    pub afy: f32,
28455    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28456    pub afz: f32,
28457    #[doc = "yaw setpoint"]
28458    pub yaw: f32,
28459    #[doc = "yaw rate setpoint"]
28460    pub yaw_rate: f32,
28461    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28462    pub type_mask: PositionTargetTypemask,
28463    #[doc = "System ID"]
28464    pub target_system: u8,
28465    #[doc = "Component ID"]
28466    pub target_component: u8,
28467    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
28468    pub coordinate_frame: MavFrame,
28469}
28470impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
28471    pub const ENCODED_LEN: usize = 53usize;
28472    pub const DEFAULT: Self = Self {
28473        time_boot_ms: 0_u32,
28474        lat_int: 0_i32,
28475        lon_int: 0_i32,
28476        alt: 0.0_f32,
28477        vx: 0.0_f32,
28478        vy: 0.0_f32,
28479        vz: 0.0_f32,
28480        afx: 0.0_f32,
28481        afy: 0.0_f32,
28482        afz: 0.0_f32,
28483        yaw: 0.0_f32,
28484        yaw_rate: 0.0_f32,
28485        type_mask: PositionTargetTypemask::DEFAULT,
28486        target_system: 0_u8,
28487        target_component: 0_u8,
28488        coordinate_frame: MavFrame::DEFAULT,
28489    };
28490    #[cfg(feature = "arbitrary")]
28491    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28492        use arbitrary::{Arbitrary, Unstructured};
28493        let mut buf = [0u8; 1024];
28494        rng.fill_bytes(&mut buf);
28495        let mut unstructured = Unstructured::new(&buf);
28496        Self::arbitrary(&mut unstructured).unwrap_or_default()
28497    }
28498}
28499impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28500    fn default() -> Self {
28501        Self::DEFAULT.clone()
28502    }
28503}
28504impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
28505    type Message = MavMessage;
28506    const ID: u32 = 86u32;
28507    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
28508    const EXTRA_CRC: u8 = 5u8;
28509    const ENCODED_LEN: usize = 53usize;
28510    fn deser(
28511        _version: MavlinkVersion,
28512        __input: &[u8],
28513    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28514        let avail_len = __input.len();
28515        let mut payload_buf = [0; Self::ENCODED_LEN];
28516        let mut buf = if avail_len < Self::ENCODED_LEN {
28517            payload_buf[0..avail_len].copy_from_slice(__input);
28518            Bytes::new(&payload_buf)
28519        } else {
28520            Bytes::new(__input)
28521        };
28522        let mut __struct = Self::default();
28523        __struct.time_boot_ms = buf.get_u32_le();
28524        __struct.lat_int = buf.get_i32_le();
28525        __struct.lon_int = buf.get_i32_le();
28526        __struct.alt = buf.get_f32_le();
28527        __struct.vx = buf.get_f32_le();
28528        __struct.vy = buf.get_f32_le();
28529        __struct.vz = buf.get_f32_le();
28530        __struct.afx = buf.get_f32_le();
28531        __struct.afy = buf.get_f32_le();
28532        __struct.afz = buf.get_f32_le();
28533        __struct.yaw = buf.get_f32_le();
28534        __struct.yaw_rate = buf.get_f32_le();
28535        let tmp = buf.get_u16_le();
28536        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
28537            ::mavlink_core::error::ParserError::InvalidFlag {
28538                flag_type: "PositionTargetTypemask",
28539                value: tmp as u64,
28540            },
28541        )?;
28542        __struct.target_system = buf.get_u8();
28543        __struct.target_component = buf.get_u8();
28544        let tmp = buf.get_u8();
28545        __struct.coordinate_frame =
28546            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28547                enum_type: "MavFrame",
28548                value: tmp as u64,
28549            })?;
28550        Ok(__struct)
28551    }
28552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28553        let mut __tmp = BytesMut::new(bytes);
28554        #[allow(clippy::absurd_extreme_comparisons)]
28555        #[allow(unused_comparisons)]
28556        if __tmp.remaining() < Self::ENCODED_LEN {
28557            panic!(
28558                "buffer is too small (need {} bytes, but got {})",
28559                Self::ENCODED_LEN,
28560                __tmp.remaining(),
28561            )
28562        }
28563        __tmp.put_u32_le(self.time_boot_ms);
28564        __tmp.put_i32_le(self.lat_int);
28565        __tmp.put_i32_le(self.lon_int);
28566        __tmp.put_f32_le(self.alt);
28567        __tmp.put_f32_le(self.vx);
28568        __tmp.put_f32_le(self.vy);
28569        __tmp.put_f32_le(self.vz);
28570        __tmp.put_f32_le(self.afx);
28571        __tmp.put_f32_le(self.afy);
28572        __tmp.put_f32_le(self.afz);
28573        __tmp.put_f32_le(self.yaw);
28574        __tmp.put_f32_le(self.yaw_rate);
28575        __tmp.put_u16_le(self.type_mask.bits());
28576        __tmp.put_u8(self.target_system);
28577        __tmp.put_u8(self.target_component);
28578        __tmp.put_u8(self.coordinate_frame as u8);
28579        if matches!(version, MavlinkVersion::V2) {
28580            let len = __tmp.len();
28581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28582        } else {
28583            __tmp.len()
28584        }
28585    }
28586}
28587#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
28588#[doc = ""]
28589#[doc = "ID: 84"]
28590#[derive(Debug, Clone, PartialEq)]
28591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28593#[cfg_attr(feature = "ts", derive(TS))]
28594#[cfg_attr(feature = "ts", ts(export))]
28595pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
28596    #[doc = "Timestamp (time since system boot)."]
28597    pub time_boot_ms: u32,
28598    #[doc = "X Position in NED frame"]
28599    pub x: f32,
28600    #[doc = "Y Position in NED frame"]
28601    pub y: f32,
28602    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
28603    pub z: f32,
28604    #[doc = "X velocity in NED frame"]
28605    pub vx: f32,
28606    #[doc = "Y velocity in NED frame"]
28607    pub vy: f32,
28608    #[doc = "Z velocity in NED frame"]
28609    pub vz: f32,
28610    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28611    pub afx: f32,
28612    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28613    pub afy: f32,
28614    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
28615    pub afz: f32,
28616    #[doc = "yaw setpoint"]
28617    pub yaw: f32,
28618    #[doc = "yaw rate setpoint"]
28619    pub yaw_rate: f32,
28620    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28621    pub type_mask: PositionTargetTypemask,
28622    #[doc = "System ID"]
28623    pub target_system: u8,
28624    #[doc = "Component ID"]
28625    pub target_component: u8,
28626    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
28627    pub coordinate_frame: MavFrame,
28628}
28629impl SET_POSITION_TARGET_LOCAL_NED_DATA {
28630    pub const ENCODED_LEN: usize = 53usize;
28631    pub const DEFAULT: Self = Self {
28632        time_boot_ms: 0_u32,
28633        x: 0.0_f32,
28634        y: 0.0_f32,
28635        z: 0.0_f32,
28636        vx: 0.0_f32,
28637        vy: 0.0_f32,
28638        vz: 0.0_f32,
28639        afx: 0.0_f32,
28640        afy: 0.0_f32,
28641        afz: 0.0_f32,
28642        yaw: 0.0_f32,
28643        yaw_rate: 0.0_f32,
28644        type_mask: PositionTargetTypemask::DEFAULT,
28645        target_system: 0_u8,
28646        target_component: 0_u8,
28647        coordinate_frame: MavFrame::DEFAULT,
28648    };
28649    #[cfg(feature = "arbitrary")]
28650    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28651        use arbitrary::{Arbitrary, Unstructured};
28652        let mut buf = [0u8; 1024];
28653        rng.fill_bytes(&mut buf);
28654        let mut unstructured = Unstructured::new(&buf);
28655        Self::arbitrary(&mut unstructured).unwrap_or_default()
28656    }
28657}
28658impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
28659    fn default() -> Self {
28660        Self::DEFAULT.clone()
28661    }
28662}
28663impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
28664    type Message = MavMessage;
28665    const ID: u32 = 84u32;
28666    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
28667    const EXTRA_CRC: u8 = 143u8;
28668    const ENCODED_LEN: usize = 53usize;
28669    fn deser(
28670        _version: MavlinkVersion,
28671        __input: &[u8],
28672    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28673        let avail_len = __input.len();
28674        let mut payload_buf = [0; Self::ENCODED_LEN];
28675        let mut buf = if avail_len < Self::ENCODED_LEN {
28676            payload_buf[0..avail_len].copy_from_slice(__input);
28677            Bytes::new(&payload_buf)
28678        } else {
28679            Bytes::new(__input)
28680        };
28681        let mut __struct = Self::default();
28682        __struct.time_boot_ms = buf.get_u32_le();
28683        __struct.x = buf.get_f32_le();
28684        __struct.y = buf.get_f32_le();
28685        __struct.z = buf.get_f32_le();
28686        __struct.vx = buf.get_f32_le();
28687        __struct.vy = buf.get_f32_le();
28688        __struct.vz = buf.get_f32_le();
28689        __struct.afx = buf.get_f32_le();
28690        __struct.afy = buf.get_f32_le();
28691        __struct.afz = buf.get_f32_le();
28692        __struct.yaw = buf.get_f32_le();
28693        __struct.yaw_rate = buf.get_f32_le();
28694        let tmp = buf.get_u16_le();
28695        __struct.type_mask = PositionTargetTypemask::from_bits(tmp).ok_or(
28696            ::mavlink_core::error::ParserError::InvalidFlag {
28697                flag_type: "PositionTargetTypemask",
28698                value: tmp as u64,
28699            },
28700        )?;
28701        __struct.target_system = buf.get_u8();
28702        __struct.target_component = buf.get_u8();
28703        let tmp = buf.get_u8();
28704        __struct.coordinate_frame =
28705            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28706                enum_type: "MavFrame",
28707                value: tmp as u64,
28708            })?;
28709        Ok(__struct)
28710    }
28711    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28712        let mut __tmp = BytesMut::new(bytes);
28713        #[allow(clippy::absurd_extreme_comparisons)]
28714        #[allow(unused_comparisons)]
28715        if __tmp.remaining() < Self::ENCODED_LEN {
28716            panic!(
28717                "buffer is too small (need {} bytes, but got {})",
28718                Self::ENCODED_LEN,
28719                __tmp.remaining(),
28720            )
28721        }
28722        __tmp.put_u32_le(self.time_boot_ms);
28723        __tmp.put_f32_le(self.x);
28724        __tmp.put_f32_le(self.y);
28725        __tmp.put_f32_le(self.z);
28726        __tmp.put_f32_le(self.vx);
28727        __tmp.put_f32_le(self.vy);
28728        __tmp.put_f32_le(self.vz);
28729        __tmp.put_f32_le(self.afx);
28730        __tmp.put_f32_le(self.afy);
28731        __tmp.put_f32_le(self.afz);
28732        __tmp.put_f32_le(self.yaw);
28733        __tmp.put_f32_le(self.yaw_rate);
28734        __tmp.put_u16_le(self.type_mask.bits());
28735        __tmp.put_u8(self.target_system);
28736        __tmp.put_u8(self.target_component);
28737        __tmp.put_u8(self.coordinate_frame as u8);
28738        if matches!(version, MavlinkVersion::V2) {
28739            let len = __tmp.len();
28740            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28741        } else {
28742            __tmp.len()
28743        }
28744    }
28745}
28746#[doc = "Status of simulation environment, if used."]
28747#[doc = ""]
28748#[doc = "ID: 108"]
28749#[derive(Debug, Clone, PartialEq)]
28750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28752#[cfg_attr(feature = "ts", derive(TS))]
28753#[cfg_attr(feature = "ts", ts(export))]
28754pub struct SIM_STATE_DATA {
28755    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
28756    pub q1: f32,
28757    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
28758    pub q2: f32,
28759    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
28760    pub q3: f32,
28761    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
28762    pub q4: f32,
28763    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
28764    pub roll: f32,
28765    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
28766    pub pitch: f32,
28767    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
28768    pub yaw: f32,
28769    #[doc = "X acceleration"]
28770    pub xacc: f32,
28771    #[doc = "Y acceleration"]
28772    pub yacc: f32,
28773    #[doc = "Z acceleration"]
28774    pub zacc: f32,
28775    #[doc = "Angular speed around X axis"]
28776    pub xgyro: f32,
28777    #[doc = "Angular speed around Y axis"]
28778    pub ygyro: f32,
28779    #[doc = "Angular speed around Z axis"]
28780    pub zgyro: f32,
28781    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
28782    pub lat: f32,
28783    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
28784    pub lon: f32,
28785    #[doc = "Altitude"]
28786    pub alt: f32,
28787    #[doc = "Horizontal position standard deviation"]
28788    pub std_dev_horz: f32,
28789    #[doc = "Vertical position standard deviation"]
28790    pub std_dev_vert: f32,
28791    #[doc = "True velocity in north direction in earth-fixed NED frame"]
28792    pub vn: f32,
28793    #[doc = "True velocity in east direction in earth-fixed NED frame"]
28794    pub ve: f32,
28795    #[doc = "True velocity in down direction in earth-fixed NED frame"]
28796    pub vd: f32,
28797    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
28798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28799    pub lat_int: i32,
28800    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
28801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28802    pub lon_int: i32,
28803}
28804impl SIM_STATE_DATA {
28805    pub const ENCODED_LEN: usize = 92usize;
28806    pub const DEFAULT: Self = Self {
28807        q1: 0.0_f32,
28808        q2: 0.0_f32,
28809        q3: 0.0_f32,
28810        q4: 0.0_f32,
28811        roll: 0.0_f32,
28812        pitch: 0.0_f32,
28813        yaw: 0.0_f32,
28814        xacc: 0.0_f32,
28815        yacc: 0.0_f32,
28816        zacc: 0.0_f32,
28817        xgyro: 0.0_f32,
28818        ygyro: 0.0_f32,
28819        zgyro: 0.0_f32,
28820        lat: 0.0_f32,
28821        lon: 0.0_f32,
28822        alt: 0.0_f32,
28823        std_dev_horz: 0.0_f32,
28824        std_dev_vert: 0.0_f32,
28825        vn: 0.0_f32,
28826        ve: 0.0_f32,
28827        vd: 0.0_f32,
28828        lat_int: 0_i32,
28829        lon_int: 0_i32,
28830    };
28831    #[cfg(feature = "arbitrary")]
28832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28833        use arbitrary::{Arbitrary, Unstructured};
28834        let mut buf = [0u8; 1024];
28835        rng.fill_bytes(&mut buf);
28836        let mut unstructured = Unstructured::new(&buf);
28837        Self::arbitrary(&mut unstructured).unwrap_or_default()
28838    }
28839}
28840impl Default for SIM_STATE_DATA {
28841    fn default() -> Self {
28842        Self::DEFAULT.clone()
28843    }
28844}
28845impl MessageData for SIM_STATE_DATA {
28846    type Message = MavMessage;
28847    const ID: u32 = 108u32;
28848    const NAME: &'static str = "SIM_STATE";
28849    const EXTRA_CRC: u8 = 32u8;
28850    const ENCODED_LEN: usize = 92usize;
28851    fn deser(
28852        _version: MavlinkVersion,
28853        __input: &[u8],
28854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28855        let avail_len = __input.len();
28856        let mut payload_buf = [0; Self::ENCODED_LEN];
28857        let mut buf = if avail_len < Self::ENCODED_LEN {
28858            payload_buf[0..avail_len].copy_from_slice(__input);
28859            Bytes::new(&payload_buf)
28860        } else {
28861            Bytes::new(__input)
28862        };
28863        let mut __struct = Self::default();
28864        __struct.q1 = buf.get_f32_le();
28865        __struct.q2 = buf.get_f32_le();
28866        __struct.q3 = buf.get_f32_le();
28867        __struct.q4 = buf.get_f32_le();
28868        __struct.roll = buf.get_f32_le();
28869        __struct.pitch = buf.get_f32_le();
28870        __struct.yaw = buf.get_f32_le();
28871        __struct.xacc = buf.get_f32_le();
28872        __struct.yacc = buf.get_f32_le();
28873        __struct.zacc = buf.get_f32_le();
28874        __struct.xgyro = buf.get_f32_le();
28875        __struct.ygyro = buf.get_f32_le();
28876        __struct.zgyro = buf.get_f32_le();
28877        __struct.lat = buf.get_f32_le();
28878        __struct.lon = buf.get_f32_le();
28879        __struct.alt = buf.get_f32_le();
28880        __struct.std_dev_horz = buf.get_f32_le();
28881        __struct.std_dev_vert = buf.get_f32_le();
28882        __struct.vn = buf.get_f32_le();
28883        __struct.ve = buf.get_f32_le();
28884        __struct.vd = buf.get_f32_le();
28885        __struct.lat_int = buf.get_i32_le();
28886        __struct.lon_int = buf.get_i32_le();
28887        Ok(__struct)
28888    }
28889    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28890        let mut __tmp = BytesMut::new(bytes);
28891        #[allow(clippy::absurd_extreme_comparisons)]
28892        #[allow(unused_comparisons)]
28893        if __tmp.remaining() < Self::ENCODED_LEN {
28894            panic!(
28895                "buffer is too small (need {} bytes, but got {})",
28896                Self::ENCODED_LEN,
28897                __tmp.remaining(),
28898            )
28899        }
28900        __tmp.put_f32_le(self.q1);
28901        __tmp.put_f32_le(self.q2);
28902        __tmp.put_f32_le(self.q3);
28903        __tmp.put_f32_le(self.q4);
28904        __tmp.put_f32_le(self.roll);
28905        __tmp.put_f32_le(self.pitch);
28906        __tmp.put_f32_le(self.yaw);
28907        __tmp.put_f32_le(self.xacc);
28908        __tmp.put_f32_le(self.yacc);
28909        __tmp.put_f32_le(self.zacc);
28910        __tmp.put_f32_le(self.xgyro);
28911        __tmp.put_f32_le(self.ygyro);
28912        __tmp.put_f32_le(self.zgyro);
28913        __tmp.put_f32_le(self.lat);
28914        __tmp.put_f32_le(self.lon);
28915        __tmp.put_f32_le(self.alt);
28916        __tmp.put_f32_le(self.std_dev_horz);
28917        __tmp.put_f32_le(self.std_dev_vert);
28918        __tmp.put_f32_le(self.vn);
28919        __tmp.put_f32_le(self.ve);
28920        __tmp.put_f32_le(self.vd);
28921        if matches!(version, MavlinkVersion::V2) {
28922            __tmp.put_i32_le(self.lat_int);
28923            __tmp.put_i32_le(self.lon_int);
28924            let len = __tmp.len();
28925            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28926        } else {
28927            __tmp.len()
28928        }
28929    }
28930}
28931#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
28932#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
28933#[doc = ""]
28934#[doc = "ID: 370"]
28935#[derive(Debug, Clone, PartialEq)]
28936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28938#[cfg_attr(feature = "ts", derive(TS))]
28939#[cfg_attr(feature = "ts", ts(export))]
28940pub struct SMART_BATTERY_INFO_DATA {
28941    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
28942    pub capacity_full_specification: i32,
28943    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
28944    pub capacity_full: i32,
28945    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
28946    pub cycle_count: u16,
28947    #[doc = "Battery weight. 0: field not provided."]
28948    pub weight: u16,
28949    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
28950    pub discharge_minimum_voltage: u16,
28951    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
28952    pub charging_minimum_voltage: u16,
28953    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
28954    pub resting_minimum_voltage: u16,
28955    #[doc = "Battery ID"]
28956    pub id: u8,
28957    #[doc = "Function of the battery"]
28958    pub battery_function: MavBatteryFunction,
28959    #[doc = "Type (chemistry) of the battery"]
28960    pub mavtype: MavBatteryType,
28961    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
28962    #[cfg_attr(feature = "ts", ts(type = "string"))]
28963    pub serial_number: CharArray<16>,
28964    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
28965    #[cfg_attr(feature = "ts", ts(type = "string"))]
28966    pub device_name: CharArray<50>,
28967    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
28968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28969    pub charging_maximum_voltage: u16,
28970    #[doc = "Number of battery cells in series. 0: field not provided."]
28971    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28972    pub cells_in_series: u8,
28973    #[doc = "Maximum pack discharge current. 0: field not provided."]
28974    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28975    pub discharge_maximum_current: u32,
28976    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
28977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28978    pub discharge_maximum_burst_current: u32,
28979    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
28980    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28981    #[cfg_attr(feature = "ts", ts(type = "string"))]
28982    pub manufacture_date: CharArray<11>,
28983}
28984impl SMART_BATTERY_INFO_DATA {
28985    pub const ENCODED_LEN: usize = 109usize;
28986    pub const DEFAULT: Self = Self {
28987        capacity_full_specification: 0_i32,
28988        capacity_full: 0_i32,
28989        cycle_count: 0_u16,
28990        weight: 0_u16,
28991        discharge_minimum_voltage: 0_u16,
28992        charging_minimum_voltage: 0_u16,
28993        resting_minimum_voltage: 0_u16,
28994        id: 0_u8,
28995        battery_function: MavBatteryFunction::DEFAULT,
28996        mavtype: MavBatteryType::DEFAULT,
28997        serial_number: CharArray::new([0_u8; 16usize]),
28998        device_name: CharArray::new([0_u8; 50usize]),
28999        charging_maximum_voltage: 0_u16,
29000        cells_in_series: 0_u8,
29001        discharge_maximum_current: 0_u32,
29002        discharge_maximum_burst_current: 0_u32,
29003        manufacture_date: CharArray::new([0_u8; 11usize]),
29004    };
29005    #[cfg(feature = "arbitrary")]
29006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29007        use arbitrary::{Arbitrary, Unstructured};
29008        let mut buf = [0u8; 1024];
29009        rng.fill_bytes(&mut buf);
29010        let mut unstructured = Unstructured::new(&buf);
29011        Self::arbitrary(&mut unstructured).unwrap_or_default()
29012    }
29013}
29014impl Default for SMART_BATTERY_INFO_DATA {
29015    fn default() -> Self {
29016        Self::DEFAULT.clone()
29017    }
29018}
29019impl MessageData for SMART_BATTERY_INFO_DATA {
29020    type Message = MavMessage;
29021    const ID: u32 = 370u32;
29022    const NAME: &'static str = "SMART_BATTERY_INFO";
29023    const EXTRA_CRC: u8 = 75u8;
29024    const ENCODED_LEN: usize = 109usize;
29025    fn deser(
29026        _version: MavlinkVersion,
29027        __input: &[u8],
29028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29029        let avail_len = __input.len();
29030        let mut payload_buf = [0; Self::ENCODED_LEN];
29031        let mut buf = if avail_len < Self::ENCODED_LEN {
29032            payload_buf[0..avail_len].copy_from_slice(__input);
29033            Bytes::new(&payload_buf)
29034        } else {
29035            Bytes::new(__input)
29036        };
29037        let mut __struct = Self::default();
29038        __struct.capacity_full_specification = buf.get_i32_le();
29039        __struct.capacity_full = buf.get_i32_le();
29040        __struct.cycle_count = buf.get_u16_le();
29041        __struct.weight = buf.get_u16_le();
29042        __struct.discharge_minimum_voltage = buf.get_u16_le();
29043        __struct.charging_minimum_voltage = buf.get_u16_le();
29044        __struct.resting_minimum_voltage = buf.get_u16_le();
29045        __struct.id = buf.get_u8();
29046        let tmp = buf.get_u8();
29047        __struct.battery_function =
29048            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29049                enum_type: "MavBatteryFunction",
29050                value: tmp as u64,
29051            })?;
29052        let tmp = buf.get_u8();
29053        __struct.mavtype =
29054            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29055                enum_type: "MavBatteryType",
29056                value: tmp as u64,
29057            })?;
29058        let mut tmp = [0_u8; 16usize];
29059        for v in &mut tmp {
29060            *v = buf.get_u8();
29061        }
29062        __struct.serial_number = CharArray::new(tmp);
29063        let mut tmp = [0_u8; 50usize];
29064        for v in &mut tmp {
29065            *v = buf.get_u8();
29066        }
29067        __struct.device_name = CharArray::new(tmp);
29068        __struct.charging_maximum_voltage = buf.get_u16_le();
29069        __struct.cells_in_series = buf.get_u8();
29070        __struct.discharge_maximum_current = buf.get_u32_le();
29071        __struct.discharge_maximum_burst_current = buf.get_u32_le();
29072        let mut tmp = [0_u8; 11usize];
29073        for v in &mut tmp {
29074            *v = buf.get_u8();
29075        }
29076        __struct.manufacture_date = CharArray::new(tmp);
29077        Ok(__struct)
29078    }
29079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29080        let mut __tmp = BytesMut::new(bytes);
29081        #[allow(clippy::absurd_extreme_comparisons)]
29082        #[allow(unused_comparisons)]
29083        if __tmp.remaining() < Self::ENCODED_LEN {
29084            panic!(
29085                "buffer is too small (need {} bytes, but got {})",
29086                Self::ENCODED_LEN,
29087                __tmp.remaining(),
29088            )
29089        }
29090        __tmp.put_i32_le(self.capacity_full_specification);
29091        __tmp.put_i32_le(self.capacity_full);
29092        __tmp.put_u16_le(self.cycle_count);
29093        __tmp.put_u16_le(self.weight);
29094        __tmp.put_u16_le(self.discharge_minimum_voltage);
29095        __tmp.put_u16_le(self.charging_minimum_voltage);
29096        __tmp.put_u16_le(self.resting_minimum_voltage);
29097        __tmp.put_u8(self.id);
29098        __tmp.put_u8(self.battery_function as u8);
29099        __tmp.put_u8(self.mavtype as u8);
29100        for val in &self.serial_number {
29101            __tmp.put_u8(*val);
29102        }
29103        for val in &self.device_name {
29104            __tmp.put_u8(*val);
29105        }
29106        if matches!(version, MavlinkVersion::V2) {
29107            __tmp.put_u16_le(self.charging_maximum_voltage);
29108            __tmp.put_u8(self.cells_in_series);
29109            __tmp.put_u32_le(self.discharge_maximum_current);
29110            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29111            for val in &self.manufacture_date {
29112                __tmp.put_u8(*val);
29113            }
29114            let len = __tmp.len();
29115            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29116        } else {
29117            __tmp.len()
29118        }
29119    }
29120}
29121#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29122#[doc = ""]
29123#[doc = "ID: 253"]
29124#[derive(Debug, Clone, PartialEq)]
29125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29126#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29127#[cfg_attr(feature = "ts", derive(TS))]
29128#[cfg_attr(feature = "ts", ts(export))]
29129pub struct STATUSTEXT_DATA {
29130    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29131    pub severity: MavSeverity,
29132    #[doc = "Status text message, without null termination character"]
29133    #[cfg_attr(feature = "ts", ts(type = "string"))]
29134    pub text: CharArray<50>,
29135    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29136    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29137    pub id: u16,
29138    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29140    pub chunk_seq: u8,
29141}
29142impl STATUSTEXT_DATA {
29143    pub const ENCODED_LEN: usize = 54usize;
29144    pub const DEFAULT: Self = Self {
29145        severity: MavSeverity::DEFAULT,
29146        text: CharArray::new([0_u8; 50usize]),
29147        id: 0_u16,
29148        chunk_seq: 0_u8,
29149    };
29150    #[cfg(feature = "arbitrary")]
29151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29152        use arbitrary::{Arbitrary, Unstructured};
29153        let mut buf = [0u8; 1024];
29154        rng.fill_bytes(&mut buf);
29155        let mut unstructured = Unstructured::new(&buf);
29156        Self::arbitrary(&mut unstructured).unwrap_or_default()
29157    }
29158}
29159impl Default for STATUSTEXT_DATA {
29160    fn default() -> Self {
29161        Self::DEFAULT.clone()
29162    }
29163}
29164impl MessageData for STATUSTEXT_DATA {
29165    type Message = MavMessage;
29166    const ID: u32 = 253u32;
29167    const NAME: &'static str = "STATUSTEXT";
29168    const EXTRA_CRC: u8 = 83u8;
29169    const ENCODED_LEN: usize = 54usize;
29170    fn deser(
29171        _version: MavlinkVersion,
29172        __input: &[u8],
29173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29174        let avail_len = __input.len();
29175        let mut payload_buf = [0; Self::ENCODED_LEN];
29176        let mut buf = if avail_len < Self::ENCODED_LEN {
29177            payload_buf[0..avail_len].copy_from_slice(__input);
29178            Bytes::new(&payload_buf)
29179        } else {
29180            Bytes::new(__input)
29181        };
29182        let mut __struct = Self::default();
29183        let tmp = buf.get_u8();
29184        __struct.severity =
29185            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29186                enum_type: "MavSeverity",
29187                value: tmp as u64,
29188            })?;
29189        let mut tmp = [0_u8; 50usize];
29190        for v in &mut tmp {
29191            *v = buf.get_u8();
29192        }
29193        __struct.text = CharArray::new(tmp);
29194        __struct.id = buf.get_u16_le();
29195        __struct.chunk_seq = buf.get_u8();
29196        Ok(__struct)
29197    }
29198    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29199        let mut __tmp = BytesMut::new(bytes);
29200        #[allow(clippy::absurd_extreme_comparisons)]
29201        #[allow(unused_comparisons)]
29202        if __tmp.remaining() < Self::ENCODED_LEN {
29203            panic!(
29204                "buffer is too small (need {} bytes, but got {})",
29205                Self::ENCODED_LEN,
29206                __tmp.remaining(),
29207            )
29208        }
29209        __tmp.put_u8(self.severity as u8);
29210        for val in &self.text {
29211            __tmp.put_u8(*val);
29212        }
29213        if matches!(version, MavlinkVersion::V2) {
29214            __tmp.put_u16_le(self.id);
29215            __tmp.put_u8(self.chunk_seq);
29216            let len = __tmp.len();
29217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29218        } else {
29219            __tmp.len()
29220        }
29221    }
29222}
29223#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29224#[doc = ""]
29225#[doc = "ID: 261"]
29226#[derive(Debug, Clone, PartialEq)]
29227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29229#[cfg_attr(feature = "ts", derive(TS))]
29230#[cfg_attr(feature = "ts", ts(export))]
29231pub struct STORAGE_INFORMATION_DATA {
29232    #[doc = "Timestamp (time since system boot)."]
29233    pub time_boot_ms: u32,
29234    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29235    pub total_capacity: f32,
29236    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29237    pub used_capacity: f32,
29238    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29239    pub available_capacity: f32,
29240    #[doc = "Read speed."]
29241    pub read_speed: f32,
29242    #[doc = "Write speed."]
29243    pub write_speed: f32,
29244    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29245    pub storage_id: u8,
29246    #[doc = "Number of storage devices"]
29247    pub storage_count: u8,
29248    #[doc = "Status of storage"]
29249    pub status: StorageStatus,
29250    #[doc = "Type of storage"]
29251    #[cfg_attr(feature = "serde", serde(default))]
29252    pub mavtype: StorageType,
29253    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29254    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29255    #[cfg_attr(feature = "ts", ts(type = "string"))]
29256    pub name: CharArray<32>,
29257    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29258    #[cfg_attr(feature = "serde", serde(default))]
29259    pub storage_usage: StorageUsageFlag,
29260}
29261impl STORAGE_INFORMATION_DATA {
29262    pub const ENCODED_LEN: usize = 61usize;
29263    pub const DEFAULT: Self = Self {
29264        time_boot_ms: 0_u32,
29265        total_capacity: 0.0_f32,
29266        used_capacity: 0.0_f32,
29267        available_capacity: 0.0_f32,
29268        read_speed: 0.0_f32,
29269        write_speed: 0.0_f32,
29270        storage_id: 0_u8,
29271        storage_count: 0_u8,
29272        status: StorageStatus::DEFAULT,
29273        mavtype: StorageType::DEFAULT,
29274        name: CharArray::new([0_u8; 32usize]),
29275        storage_usage: StorageUsageFlag::DEFAULT,
29276    };
29277    #[cfg(feature = "arbitrary")]
29278    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29279        use arbitrary::{Arbitrary, Unstructured};
29280        let mut buf = [0u8; 1024];
29281        rng.fill_bytes(&mut buf);
29282        let mut unstructured = Unstructured::new(&buf);
29283        Self::arbitrary(&mut unstructured).unwrap_or_default()
29284    }
29285}
29286impl Default for STORAGE_INFORMATION_DATA {
29287    fn default() -> Self {
29288        Self::DEFAULT.clone()
29289    }
29290}
29291impl MessageData for STORAGE_INFORMATION_DATA {
29292    type Message = MavMessage;
29293    const ID: u32 = 261u32;
29294    const NAME: &'static str = "STORAGE_INFORMATION";
29295    const EXTRA_CRC: u8 = 179u8;
29296    const ENCODED_LEN: usize = 61usize;
29297    fn deser(
29298        _version: MavlinkVersion,
29299        __input: &[u8],
29300    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29301        let avail_len = __input.len();
29302        let mut payload_buf = [0; Self::ENCODED_LEN];
29303        let mut buf = if avail_len < Self::ENCODED_LEN {
29304            payload_buf[0..avail_len].copy_from_slice(__input);
29305            Bytes::new(&payload_buf)
29306        } else {
29307            Bytes::new(__input)
29308        };
29309        let mut __struct = Self::default();
29310        __struct.time_boot_ms = buf.get_u32_le();
29311        __struct.total_capacity = buf.get_f32_le();
29312        __struct.used_capacity = buf.get_f32_le();
29313        __struct.available_capacity = buf.get_f32_le();
29314        __struct.read_speed = buf.get_f32_le();
29315        __struct.write_speed = buf.get_f32_le();
29316        __struct.storage_id = buf.get_u8();
29317        __struct.storage_count = buf.get_u8();
29318        let tmp = buf.get_u8();
29319        __struct.status =
29320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29321                enum_type: "StorageStatus",
29322                value: tmp as u64,
29323            })?;
29324        let tmp = buf.get_u8();
29325        __struct.mavtype =
29326            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29327                enum_type: "StorageType",
29328                value: tmp as u64,
29329            })?;
29330        let mut tmp = [0_u8; 32usize];
29331        for v in &mut tmp {
29332            *v = buf.get_u8();
29333        }
29334        __struct.name = CharArray::new(tmp);
29335        let tmp = buf.get_u8();
29336        __struct.storage_usage = StorageUsageFlag::from_bits(tmp).ok_or(
29337            ::mavlink_core::error::ParserError::InvalidFlag {
29338                flag_type: "StorageUsageFlag",
29339                value: tmp as u64,
29340            },
29341        )?;
29342        Ok(__struct)
29343    }
29344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29345        let mut __tmp = BytesMut::new(bytes);
29346        #[allow(clippy::absurd_extreme_comparisons)]
29347        #[allow(unused_comparisons)]
29348        if __tmp.remaining() < Self::ENCODED_LEN {
29349            panic!(
29350                "buffer is too small (need {} bytes, but got {})",
29351                Self::ENCODED_LEN,
29352                __tmp.remaining(),
29353            )
29354        }
29355        __tmp.put_u32_le(self.time_boot_ms);
29356        __tmp.put_f32_le(self.total_capacity);
29357        __tmp.put_f32_le(self.used_capacity);
29358        __tmp.put_f32_le(self.available_capacity);
29359        __tmp.put_f32_le(self.read_speed);
29360        __tmp.put_f32_le(self.write_speed);
29361        __tmp.put_u8(self.storage_id);
29362        __tmp.put_u8(self.storage_count);
29363        __tmp.put_u8(self.status as u8);
29364        if matches!(version, MavlinkVersion::V2) {
29365            __tmp.put_u8(self.mavtype as u8);
29366            for val in &self.name {
29367                __tmp.put_u8(*val);
29368            }
29369            __tmp.put_u8(self.storage_usage.bits());
29370            let len = __tmp.len();
29371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29372        } else {
29373            __tmp.len()
29374        }
29375    }
29376}
29377#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
29378#[doc = ""]
29379#[doc = "ID: 401"]
29380#[derive(Debug, Clone, PartialEq)]
29381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29383#[cfg_attr(feature = "ts", derive(TS))]
29384#[cfg_attr(feature = "ts", ts(export))]
29385pub struct SUPPORTED_TUNES_DATA {
29386    #[doc = "Bitfield of supported tune formats."]
29387    pub format: TuneFormat,
29388    #[doc = "System ID"]
29389    pub target_system: u8,
29390    #[doc = "Component ID"]
29391    pub target_component: u8,
29392}
29393impl SUPPORTED_TUNES_DATA {
29394    pub const ENCODED_LEN: usize = 6usize;
29395    pub const DEFAULT: Self = Self {
29396        format: TuneFormat::DEFAULT,
29397        target_system: 0_u8,
29398        target_component: 0_u8,
29399    };
29400    #[cfg(feature = "arbitrary")]
29401    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29402        use arbitrary::{Arbitrary, Unstructured};
29403        let mut buf = [0u8; 1024];
29404        rng.fill_bytes(&mut buf);
29405        let mut unstructured = Unstructured::new(&buf);
29406        Self::arbitrary(&mut unstructured).unwrap_or_default()
29407    }
29408}
29409impl Default for SUPPORTED_TUNES_DATA {
29410    fn default() -> Self {
29411        Self::DEFAULT.clone()
29412    }
29413}
29414impl MessageData for SUPPORTED_TUNES_DATA {
29415    type Message = MavMessage;
29416    const ID: u32 = 401u32;
29417    const NAME: &'static str = "SUPPORTED_TUNES";
29418    const EXTRA_CRC: u8 = 183u8;
29419    const ENCODED_LEN: usize = 6usize;
29420    fn deser(
29421        _version: MavlinkVersion,
29422        __input: &[u8],
29423    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29424        let avail_len = __input.len();
29425        let mut payload_buf = [0; Self::ENCODED_LEN];
29426        let mut buf = if avail_len < Self::ENCODED_LEN {
29427            payload_buf[0..avail_len].copy_from_slice(__input);
29428            Bytes::new(&payload_buf)
29429        } else {
29430            Bytes::new(__input)
29431        };
29432        let mut __struct = Self::default();
29433        let tmp = buf.get_u32_le();
29434        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
29435            ::mavlink_core::error::ParserError::InvalidEnum {
29436                enum_type: "TuneFormat",
29437                value: tmp as u64,
29438            },
29439        )?;
29440        __struct.target_system = buf.get_u8();
29441        __struct.target_component = buf.get_u8();
29442        Ok(__struct)
29443    }
29444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29445        let mut __tmp = BytesMut::new(bytes);
29446        #[allow(clippy::absurd_extreme_comparisons)]
29447        #[allow(unused_comparisons)]
29448        if __tmp.remaining() < Self::ENCODED_LEN {
29449            panic!(
29450                "buffer is too small (need {} bytes, but got {})",
29451                Self::ENCODED_LEN,
29452                __tmp.remaining(),
29453            )
29454        }
29455        __tmp.put_u32_le(self.format as u32);
29456        __tmp.put_u8(self.target_system);
29457        __tmp.put_u8(self.target_component);
29458        if matches!(version, MavlinkVersion::V2) {
29459            let len = __tmp.len();
29460            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29461        } else {
29462            __tmp.len()
29463        }
29464    }
29465}
29466#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
29467#[doc = ""]
29468#[doc = "ID: 2"]
29469#[derive(Debug, Clone, PartialEq)]
29470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29472#[cfg_attr(feature = "ts", derive(TS))]
29473#[cfg_attr(feature = "ts", ts(export))]
29474pub struct SYSTEM_TIME_DATA {
29475    #[doc = "Timestamp (UNIX epoch time)."]
29476    pub time_unix_usec: u64,
29477    #[doc = "Timestamp (time since system boot)."]
29478    pub time_boot_ms: u32,
29479}
29480impl SYSTEM_TIME_DATA {
29481    pub const ENCODED_LEN: usize = 12usize;
29482    pub const DEFAULT: Self = Self {
29483        time_unix_usec: 0_u64,
29484        time_boot_ms: 0_u32,
29485    };
29486    #[cfg(feature = "arbitrary")]
29487    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29488        use arbitrary::{Arbitrary, Unstructured};
29489        let mut buf = [0u8; 1024];
29490        rng.fill_bytes(&mut buf);
29491        let mut unstructured = Unstructured::new(&buf);
29492        Self::arbitrary(&mut unstructured).unwrap_or_default()
29493    }
29494}
29495impl Default for SYSTEM_TIME_DATA {
29496    fn default() -> Self {
29497        Self::DEFAULT.clone()
29498    }
29499}
29500impl MessageData for SYSTEM_TIME_DATA {
29501    type Message = MavMessage;
29502    const ID: u32 = 2u32;
29503    const NAME: &'static str = "SYSTEM_TIME";
29504    const EXTRA_CRC: u8 = 137u8;
29505    const ENCODED_LEN: usize = 12usize;
29506    fn deser(
29507        _version: MavlinkVersion,
29508        __input: &[u8],
29509    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29510        let avail_len = __input.len();
29511        let mut payload_buf = [0; Self::ENCODED_LEN];
29512        let mut buf = if avail_len < Self::ENCODED_LEN {
29513            payload_buf[0..avail_len].copy_from_slice(__input);
29514            Bytes::new(&payload_buf)
29515        } else {
29516            Bytes::new(__input)
29517        };
29518        let mut __struct = Self::default();
29519        __struct.time_unix_usec = buf.get_u64_le();
29520        __struct.time_boot_ms = buf.get_u32_le();
29521        Ok(__struct)
29522    }
29523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29524        let mut __tmp = BytesMut::new(bytes);
29525        #[allow(clippy::absurd_extreme_comparisons)]
29526        #[allow(unused_comparisons)]
29527        if __tmp.remaining() < Self::ENCODED_LEN {
29528            panic!(
29529                "buffer is too small (need {} bytes, but got {})",
29530                Self::ENCODED_LEN,
29531                __tmp.remaining(),
29532            )
29533        }
29534        __tmp.put_u64_le(self.time_unix_usec);
29535        __tmp.put_u32_le(self.time_boot_ms);
29536        if matches!(version, MavlinkVersion::V2) {
29537            let len = __tmp.len();
29538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29539        } else {
29540            __tmp.len()
29541        }
29542    }
29543}
29544#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
29545#[doc = ""]
29546#[doc = "ID: 1"]
29547#[derive(Debug, Clone, PartialEq)]
29548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29550#[cfg_attr(feature = "ts", derive(TS))]
29551#[cfg_attr(feature = "ts", ts(export))]
29552pub struct SYS_STATUS_DATA {
29553    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29554    pub onboard_control_sensors_present: MavSysStatusSensor,
29555    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29556    pub onboard_control_sensors_enabled: MavSysStatusSensor,
29557    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29558    pub onboard_control_sensors_health: MavSysStatusSensor,
29559    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
29560    pub load: u16,
29561    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
29562    pub voltage_battery: u16,
29563    #[doc = "Battery current, -1: Current not sent by autopilot"]
29564    pub current_battery: i16,
29565    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29566    pub drop_rate_comm: u16,
29567    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
29568    pub errors_comm: u16,
29569    #[doc = "Autopilot-specific errors"]
29570    pub errors_count1: u16,
29571    #[doc = "Autopilot-specific errors"]
29572    pub errors_count2: u16,
29573    #[doc = "Autopilot-specific errors"]
29574    pub errors_count3: u16,
29575    #[doc = "Autopilot-specific errors"]
29576    pub errors_count4: u16,
29577    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
29578    pub battery_remaining: i8,
29579    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
29580    #[cfg_attr(feature = "serde", serde(default))]
29581    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
29582    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
29583    #[cfg_attr(feature = "serde", serde(default))]
29584    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
29585    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
29586    #[cfg_attr(feature = "serde", serde(default))]
29587    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
29588}
29589impl SYS_STATUS_DATA {
29590    pub const ENCODED_LEN: usize = 43usize;
29591    pub const DEFAULT: Self = Self {
29592        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
29593        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
29594        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
29595        load: 0_u16,
29596        voltage_battery: 0_u16,
29597        current_battery: 0_i16,
29598        drop_rate_comm: 0_u16,
29599        errors_comm: 0_u16,
29600        errors_count1: 0_u16,
29601        errors_count2: 0_u16,
29602        errors_count3: 0_u16,
29603        errors_count4: 0_u16,
29604        battery_remaining: 0_i8,
29605        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
29606        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
29607        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
29608    };
29609    #[cfg(feature = "arbitrary")]
29610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29611        use arbitrary::{Arbitrary, Unstructured};
29612        let mut buf = [0u8; 1024];
29613        rng.fill_bytes(&mut buf);
29614        let mut unstructured = Unstructured::new(&buf);
29615        Self::arbitrary(&mut unstructured).unwrap_or_default()
29616    }
29617}
29618impl Default for SYS_STATUS_DATA {
29619    fn default() -> Self {
29620        Self::DEFAULT.clone()
29621    }
29622}
29623impl MessageData for SYS_STATUS_DATA {
29624    type Message = MavMessage;
29625    const ID: u32 = 1u32;
29626    const NAME: &'static str = "SYS_STATUS";
29627    const EXTRA_CRC: u8 = 124u8;
29628    const ENCODED_LEN: usize = 43usize;
29629    fn deser(
29630        _version: MavlinkVersion,
29631        __input: &[u8],
29632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29633        let avail_len = __input.len();
29634        let mut payload_buf = [0; Self::ENCODED_LEN];
29635        let mut buf = if avail_len < Self::ENCODED_LEN {
29636            payload_buf[0..avail_len].copy_from_slice(__input);
29637            Bytes::new(&payload_buf)
29638        } else {
29639            Bytes::new(__input)
29640        };
29641        let mut __struct = Self::default();
29642        let tmp = buf.get_u32_le();
29643        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(tmp).ok_or(
29644            ::mavlink_core::error::ParserError::InvalidFlag {
29645                flag_type: "MavSysStatusSensor",
29646                value: tmp as u64,
29647            },
29648        )?;
29649        let tmp = buf.get_u32_le();
29650        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(tmp).ok_or(
29651            ::mavlink_core::error::ParserError::InvalidFlag {
29652                flag_type: "MavSysStatusSensor",
29653                value: tmp as u64,
29654            },
29655        )?;
29656        let tmp = buf.get_u32_le();
29657        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(tmp).ok_or(
29658            ::mavlink_core::error::ParserError::InvalidFlag {
29659                flag_type: "MavSysStatusSensor",
29660                value: tmp as u64,
29661            },
29662        )?;
29663        __struct.load = buf.get_u16_le();
29664        __struct.voltage_battery = buf.get_u16_le();
29665        __struct.current_battery = buf.get_i16_le();
29666        __struct.drop_rate_comm = buf.get_u16_le();
29667        __struct.errors_comm = buf.get_u16_le();
29668        __struct.errors_count1 = buf.get_u16_le();
29669        __struct.errors_count2 = buf.get_u16_le();
29670        __struct.errors_count3 = buf.get_u16_le();
29671        __struct.errors_count4 = buf.get_u16_le();
29672        __struct.battery_remaining = buf.get_i8();
29673        let tmp = buf.get_u32_le();
29674        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
29675            tmp,
29676        )
29677        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29678            flag_type: "MavSysStatusSensorExtended",
29679            value: tmp as u64,
29680        })?;
29681        let tmp = buf.get_u32_le();
29682        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
29683            tmp,
29684        )
29685        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29686            flag_type: "MavSysStatusSensorExtended",
29687            value: tmp as u64,
29688        })?;
29689        let tmp = buf.get_u32_le();
29690        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
29691            tmp,
29692        )
29693        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29694            flag_type: "MavSysStatusSensorExtended",
29695            value: tmp as u64,
29696        })?;
29697        Ok(__struct)
29698    }
29699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29700        let mut __tmp = BytesMut::new(bytes);
29701        #[allow(clippy::absurd_extreme_comparisons)]
29702        #[allow(unused_comparisons)]
29703        if __tmp.remaining() < Self::ENCODED_LEN {
29704            panic!(
29705                "buffer is too small (need {} bytes, but got {})",
29706                Self::ENCODED_LEN,
29707                __tmp.remaining(),
29708            )
29709        }
29710        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
29711        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
29712        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
29713        __tmp.put_u16_le(self.load);
29714        __tmp.put_u16_le(self.voltage_battery);
29715        __tmp.put_i16_le(self.current_battery);
29716        __tmp.put_u16_le(self.drop_rate_comm);
29717        __tmp.put_u16_le(self.errors_comm);
29718        __tmp.put_u16_le(self.errors_count1);
29719        __tmp.put_u16_le(self.errors_count2);
29720        __tmp.put_u16_le(self.errors_count3);
29721        __tmp.put_u16_le(self.errors_count4);
29722        __tmp.put_i8(self.battery_remaining);
29723        if matches!(version, MavlinkVersion::V2) {
29724            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
29725            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
29726            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
29727            let len = __tmp.len();
29728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29729        } else {
29730            __tmp.len()
29731        }
29732    }
29733}
29734#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
29735#[doc = ""]
29736#[doc = "ID: 135"]
29737#[derive(Debug, Clone, PartialEq)]
29738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29740#[cfg_attr(feature = "ts", derive(TS))]
29741#[cfg_attr(feature = "ts", ts(export))]
29742pub struct TERRAIN_CHECK_DATA {
29743    #[doc = "Latitude"]
29744    pub lat: i32,
29745    #[doc = "Longitude"]
29746    pub lon: i32,
29747}
29748impl TERRAIN_CHECK_DATA {
29749    pub const ENCODED_LEN: usize = 8usize;
29750    pub const DEFAULT: Self = Self {
29751        lat: 0_i32,
29752        lon: 0_i32,
29753    };
29754    #[cfg(feature = "arbitrary")]
29755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29756        use arbitrary::{Arbitrary, Unstructured};
29757        let mut buf = [0u8; 1024];
29758        rng.fill_bytes(&mut buf);
29759        let mut unstructured = Unstructured::new(&buf);
29760        Self::arbitrary(&mut unstructured).unwrap_or_default()
29761    }
29762}
29763impl Default for TERRAIN_CHECK_DATA {
29764    fn default() -> Self {
29765        Self::DEFAULT.clone()
29766    }
29767}
29768impl MessageData for TERRAIN_CHECK_DATA {
29769    type Message = MavMessage;
29770    const ID: u32 = 135u32;
29771    const NAME: &'static str = "TERRAIN_CHECK";
29772    const EXTRA_CRC: u8 = 203u8;
29773    const ENCODED_LEN: usize = 8usize;
29774    fn deser(
29775        _version: MavlinkVersion,
29776        __input: &[u8],
29777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29778        let avail_len = __input.len();
29779        let mut payload_buf = [0; Self::ENCODED_LEN];
29780        let mut buf = if avail_len < Self::ENCODED_LEN {
29781            payload_buf[0..avail_len].copy_from_slice(__input);
29782            Bytes::new(&payload_buf)
29783        } else {
29784            Bytes::new(__input)
29785        };
29786        let mut __struct = Self::default();
29787        __struct.lat = buf.get_i32_le();
29788        __struct.lon = buf.get_i32_le();
29789        Ok(__struct)
29790    }
29791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29792        let mut __tmp = BytesMut::new(bytes);
29793        #[allow(clippy::absurd_extreme_comparisons)]
29794        #[allow(unused_comparisons)]
29795        if __tmp.remaining() < Self::ENCODED_LEN {
29796            panic!(
29797                "buffer is too small (need {} bytes, but got {})",
29798                Self::ENCODED_LEN,
29799                __tmp.remaining(),
29800            )
29801        }
29802        __tmp.put_i32_le(self.lat);
29803        __tmp.put_i32_le(self.lon);
29804        if matches!(version, MavlinkVersion::V2) {
29805            let len = __tmp.len();
29806            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29807        } else {
29808            __tmp.len()
29809        }
29810    }
29811}
29812#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29813#[doc = ""]
29814#[doc = "ID: 134"]
29815#[derive(Debug, Clone, PartialEq)]
29816#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29817#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29818#[cfg_attr(feature = "ts", derive(TS))]
29819#[cfg_attr(feature = "ts", ts(export))]
29820pub struct TERRAIN_DATA_DATA {
29821    #[doc = "Latitude of SW corner of first grid"]
29822    pub lat: i32,
29823    #[doc = "Longitude of SW corner of first grid"]
29824    pub lon: i32,
29825    #[doc = "Grid spacing"]
29826    pub grid_spacing: u16,
29827    #[doc = "Terrain data MSL"]
29828    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29829    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
29830    pub data: [i16; 16],
29831    #[doc = "bit within the terrain request mask"]
29832    pub gridbit: u8,
29833}
29834impl TERRAIN_DATA_DATA {
29835    pub const ENCODED_LEN: usize = 43usize;
29836    pub const DEFAULT: Self = Self {
29837        lat: 0_i32,
29838        lon: 0_i32,
29839        grid_spacing: 0_u16,
29840        data: [0_i16; 16usize],
29841        gridbit: 0_u8,
29842    };
29843    #[cfg(feature = "arbitrary")]
29844    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29845        use arbitrary::{Arbitrary, Unstructured};
29846        let mut buf = [0u8; 1024];
29847        rng.fill_bytes(&mut buf);
29848        let mut unstructured = Unstructured::new(&buf);
29849        Self::arbitrary(&mut unstructured).unwrap_or_default()
29850    }
29851}
29852impl Default for TERRAIN_DATA_DATA {
29853    fn default() -> Self {
29854        Self::DEFAULT.clone()
29855    }
29856}
29857impl MessageData for TERRAIN_DATA_DATA {
29858    type Message = MavMessage;
29859    const ID: u32 = 134u32;
29860    const NAME: &'static str = "TERRAIN_DATA";
29861    const EXTRA_CRC: u8 = 229u8;
29862    const ENCODED_LEN: usize = 43usize;
29863    fn deser(
29864        _version: MavlinkVersion,
29865        __input: &[u8],
29866    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29867        let avail_len = __input.len();
29868        let mut payload_buf = [0; Self::ENCODED_LEN];
29869        let mut buf = if avail_len < Self::ENCODED_LEN {
29870            payload_buf[0..avail_len].copy_from_slice(__input);
29871            Bytes::new(&payload_buf)
29872        } else {
29873            Bytes::new(__input)
29874        };
29875        let mut __struct = Self::default();
29876        __struct.lat = buf.get_i32_le();
29877        __struct.lon = buf.get_i32_le();
29878        __struct.grid_spacing = buf.get_u16_le();
29879        for v in &mut __struct.data {
29880            let val = buf.get_i16_le();
29881            *v = val;
29882        }
29883        __struct.gridbit = buf.get_u8();
29884        Ok(__struct)
29885    }
29886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29887        let mut __tmp = BytesMut::new(bytes);
29888        #[allow(clippy::absurd_extreme_comparisons)]
29889        #[allow(unused_comparisons)]
29890        if __tmp.remaining() < Self::ENCODED_LEN {
29891            panic!(
29892                "buffer is too small (need {} bytes, but got {})",
29893                Self::ENCODED_LEN,
29894                __tmp.remaining(),
29895            )
29896        }
29897        __tmp.put_i32_le(self.lat);
29898        __tmp.put_i32_le(self.lon);
29899        __tmp.put_u16_le(self.grid_spacing);
29900        for val in &self.data {
29901            __tmp.put_i16_le(*val);
29902        }
29903        __tmp.put_u8(self.gridbit);
29904        if matches!(version, MavlinkVersion::V2) {
29905            let len = __tmp.len();
29906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29907        } else {
29908            __tmp.len()
29909        }
29910    }
29911}
29912#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
29913#[doc = ""]
29914#[doc = "ID: 136"]
29915#[derive(Debug, Clone, PartialEq)]
29916#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29918#[cfg_attr(feature = "ts", derive(TS))]
29919#[cfg_attr(feature = "ts", ts(export))]
29920pub struct TERRAIN_REPORT_DATA {
29921    #[doc = "Latitude"]
29922    pub lat: i32,
29923    #[doc = "Longitude"]
29924    pub lon: i32,
29925    #[doc = "Terrain height MSL"]
29926    pub terrain_height: f32,
29927    #[doc = "Current vehicle height above lat/lon terrain height"]
29928    pub current_height: f32,
29929    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
29930    pub spacing: u16,
29931    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
29932    pub pending: u16,
29933    #[doc = "Number of 4x4 terrain blocks in memory"]
29934    pub loaded: u16,
29935}
29936impl TERRAIN_REPORT_DATA {
29937    pub const ENCODED_LEN: usize = 22usize;
29938    pub const DEFAULT: Self = Self {
29939        lat: 0_i32,
29940        lon: 0_i32,
29941        terrain_height: 0.0_f32,
29942        current_height: 0.0_f32,
29943        spacing: 0_u16,
29944        pending: 0_u16,
29945        loaded: 0_u16,
29946    };
29947    #[cfg(feature = "arbitrary")]
29948    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29949        use arbitrary::{Arbitrary, Unstructured};
29950        let mut buf = [0u8; 1024];
29951        rng.fill_bytes(&mut buf);
29952        let mut unstructured = Unstructured::new(&buf);
29953        Self::arbitrary(&mut unstructured).unwrap_or_default()
29954    }
29955}
29956impl Default for TERRAIN_REPORT_DATA {
29957    fn default() -> Self {
29958        Self::DEFAULT.clone()
29959    }
29960}
29961impl MessageData for TERRAIN_REPORT_DATA {
29962    type Message = MavMessage;
29963    const ID: u32 = 136u32;
29964    const NAME: &'static str = "TERRAIN_REPORT";
29965    const EXTRA_CRC: u8 = 1u8;
29966    const ENCODED_LEN: usize = 22usize;
29967    fn deser(
29968        _version: MavlinkVersion,
29969        __input: &[u8],
29970    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29971        let avail_len = __input.len();
29972        let mut payload_buf = [0; Self::ENCODED_LEN];
29973        let mut buf = if avail_len < Self::ENCODED_LEN {
29974            payload_buf[0..avail_len].copy_from_slice(__input);
29975            Bytes::new(&payload_buf)
29976        } else {
29977            Bytes::new(__input)
29978        };
29979        let mut __struct = Self::default();
29980        __struct.lat = buf.get_i32_le();
29981        __struct.lon = buf.get_i32_le();
29982        __struct.terrain_height = buf.get_f32_le();
29983        __struct.current_height = buf.get_f32_le();
29984        __struct.spacing = buf.get_u16_le();
29985        __struct.pending = buf.get_u16_le();
29986        __struct.loaded = buf.get_u16_le();
29987        Ok(__struct)
29988    }
29989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29990        let mut __tmp = BytesMut::new(bytes);
29991        #[allow(clippy::absurd_extreme_comparisons)]
29992        #[allow(unused_comparisons)]
29993        if __tmp.remaining() < Self::ENCODED_LEN {
29994            panic!(
29995                "buffer is too small (need {} bytes, but got {})",
29996                Self::ENCODED_LEN,
29997                __tmp.remaining(),
29998            )
29999        }
30000        __tmp.put_i32_le(self.lat);
30001        __tmp.put_i32_le(self.lon);
30002        __tmp.put_f32_le(self.terrain_height);
30003        __tmp.put_f32_le(self.current_height);
30004        __tmp.put_u16_le(self.spacing);
30005        __tmp.put_u16_le(self.pending);
30006        __tmp.put_u16_le(self.loaded);
30007        if matches!(version, MavlinkVersion::V2) {
30008            let len = __tmp.len();
30009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30010        } else {
30011            __tmp.len()
30012        }
30013    }
30014}
30015#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30016#[doc = ""]
30017#[doc = "ID: 133"]
30018#[derive(Debug, Clone, PartialEq)]
30019#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30020#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30021#[cfg_attr(feature = "ts", derive(TS))]
30022#[cfg_attr(feature = "ts", ts(export))]
30023pub struct TERRAIN_REQUEST_DATA {
30024    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
30025    pub mask: u64,
30026    #[doc = "Latitude of SW corner of first grid"]
30027    pub lat: i32,
30028    #[doc = "Longitude of SW corner of first grid"]
30029    pub lon: i32,
30030    #[doc = "Grid spacing"]
30031    pub grid_spacing: u16,
30032}
30033impl TERRAIN_REQUEST_DATA {
30034    pub const ENCODED_LEN: usize = 18usize;
30035    pub const DEFAULT: Self = Self {
30036        mask: 0_u64,
30037        lat: 0_i32,
30038        lon: 0_i32,
30039        grid_spacing: 0_u16,
30040    };
30041    #[cfg(feature = "arbitrary")]
30042    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30043        use arbitrary::{Arbitrary, Unstructured};
30044        let mut buf = [0u8; 1024];
30045        rng.fill_bytes(&mut buf);
30046        let mut unstructured = Unstructured::new(&buf);
30047        Self::arbitrary(&mut unstructured).unwrap_or_default()
30048    }
30049}
30050impl Default for TERRAIN_REQUEST_DATA {
30051    fn default() -> Self {
30052        Self::DEFAULT.clone()
30053    }
30054}
30055impl MessageData for TERRAIN_REQUEST_DATA {
30056    type Message = MavMessage;
30057    const ID: u32 = 133u32;
30058    const NAME: &'static str = "TERRAIN_REQUEST";
30059    const EXTRA_CRC: u8 = 6u8;
30060    const ENCODED_LEN: usize = 18usize;
30061    fn deser(
30062        _version: MavlinkVersion,
30063        __input: &[u8],
30064    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30065        let avail_len = __input.len();
30066        let mut payload_buf = [0; Self::ENCODED_LEN];
30067        let mut buf = if avail_len < Self::ENCODED_LEN {
30068            payload_buf[0..avail_len].copy_from_slice(__input);
30069            Bytes::new(&payload_buf)
30070        } else {
30071            Bytes::new(__input)
30072        };
30073        let mut __struct = Self::default();
30074        __struct.mask = buf.get_u64_le();
30075        __struct.lat = buf.get_i32_le();
30076        __struct.lon = buf.get_i32_le();
30077        __struct.grid_spacing = buf.get_u16_le();
30078        Ok(__struct)
30079    }
30080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30081        let mut __tmp = BytesMut::new(bytes);
30082        #[allow(clippy::absurd_extreme_comparisons)]
30083        #[allow(unused_comparisons)]
30084        if __tmp.remaining() < Self::ENCODED_LEN {
30085            panic!(
30086                "buffer is too small (need {} bytes, but got {})",
30087                Self::ENCODED_LEN,
30088                __tmp.remaining(),
30089            )
30090        }
30091        __tmp.put_u64_le(self.mask);
30092        __tmp.put_i32_le(self.lat);
30093        __tmp.put_i32_le(self.lon);
30094        __tmp.put_u16_le(self.grid_spacing);
30095        if matches!(version, MavlinkVersion::V2) {
30096            let len = __tmp.len();
30097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30098        } else {
30099            __tmp.len()
30100        }
30101    }
30102}
30103#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
30104#[doc = ""]
30105#[doc = "ID: 111"]
30106#[derive(Debug, Clone, PartialEq)]
30107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30109#[cfg_attr(feature = "ts", derive(TS))]
30110#[cfg_attr(feature = "ts", ts(export))]
30111pub struct TIMESYNC_DATA {
30112    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
30113    pub tc1: i64,
30114    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
30115    pub ts1: i64,
30116    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
30117    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30118    pub target_system: u8,
30119    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
30120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30121    pub target_component: u8,
30122}
30123impl TIMESYNC_DATA {
30124    pub const ENCODED_LEN: usize = 18usize;
30125    pub const DEFAULT: Self = Self {
30126        tc1: 0_i64,
30127        ts1: 0_i64,
30128        target_system: 0_u8,
30129        target_component: 0_u8,
30130    };
30131    #[cfg(feature = "arbitrary")]
30132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30133        use arbitrary::{Arbitrary, Unstructured};
30134        let mut buf = [0u8; 1024];
30135        rng.fill_bytes(&mut buf);
30136        let mut unstructured = Unstructured::new(&buf);
30137        Self::arbitrary(&mut unstructured).unwrap_or_default()
30138    }
30139}
30140impl Default for TIMESYNC_DATA {
30141    fn default() -> Self {
30142        Self::DEFAULT.clone()
30143    }
30144}
30145impl MessageData for TIMESYNC_DATA {
30146    type Message = MavMessage;
30147    const ID: u32 = 111u32;
30148    const NAME: &'static str = "TIMESYNC";
30149    const EXTRA_CRC: u8 = 34u8;
30150    const ENCODED_LEN: usize = 18usize;
30151    fn deser(
30152        _version: MavlinkVersion,
30153        __input: &[u8],
30154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30155        let avail_len = __input.len();
30156        let mut payload_buf = [0; Self::ENCODED_LEN];
30157        let mut buf = if avail_len < Self::ENCODED_LEN {
30158            payload_buf[0..avail_len].copy_from_slice(__input);
30159            Bytes::new(&payload_buf)
30160        } else {
30161            Bytes::new(__input)
30162        };
30163        let mut __struct = Self::default();
30164        __struct.tc1 = buf.get_i64_le();
30165        __struct.ts1 = buf.get_i64_le();
30166        __struct.target_system = buf.get_u8();
30167        __struct.target_component = buf.get_u8();
30168        Ok(__struct)
30169    }
30170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30171        let mut __tmp = BytesMut::new(bytes);
30172        #[allow(clippy::absurd_extreme_comparisons)]
30173        #[allow(unused_comparisons)]
30174        if __tmp.remaining() < Self::ENCODED_LEN {
30175            panic!(
30176                "buffer is too small (need {} bytes, but got {})",
30177                Self::ENCODED_LEN,
30178                __tmp.remaining(),
30179            )
30180        }
30181        __tmp.put_i64_le(self.tc1);
30182        __tmp.put_i64_le(self.ts1);
30183        if matches!(version, MavlinkVersion::V2) {
30184            __tmp.put_u8(self.target_system);
30185            __tmp.put_u8(self.target_component);
30186            let len = __tmp.len();
30187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30188        } else {
30189            __tmp.len()
30190        }
30191    }
30192}
30193#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
30194#[doc = ""]
30195#[doc = "ID: 380"]
30196#[derive(Debug, Clone, PartialEq)]
30197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30199#[cfg_attr(feature = "ts", derive(TS))]
30200#[cfg_attr(feature = "ts", ts(export))]
30201pub struct TIME_ESTIMATE_TO_TARGET_DATA {
30202    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
30203    pub safe_return: i32,
30204    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
30205    pub land: i32,
30206    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
30207    pub mission_next_item: i32,
30208    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
30209    pub mission_end: i32,
30210    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
30211    pub commanded_action: i32,
30212}
30213impl TIME_ESTIMATE_TO_TARGET_DATA {
30214    pub const ENCODED_LEN: usize = 20usize;
30215    pub const DEFAULT: Self = Self {
30216        safe_return: 0_i32,
30217        land: 0_i32,
30218        mission_next_item: 0_i32,
30219        mission_end: 0_i32,
30220        commanded_action: 0_i32,
30221    };
30222    #[cfg(feature = "arbitrary")]
30223    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30224        use arbitrary::{Arbitrary, Unstructured};
30225        let mut buf = [0u8; 1024];
30226        rng.fill_bytes(&mut buf);
30227        let mut unstructured = Unstructured::new(&buf);
30228        Self::arbitrary(&mut unstructured).unwrap_or_default()
30229    }
30230}
30231impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
30232    fn default() -> Self {
30233        Self::DEFAULT.clone()
30234    }
30235}
30236impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
30237    type Message = MavMessage;
30238    const ID: u32 = 380u32;
30239    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
30240    const EXTRA_CRC: u8 = 232u8;
30241    const ENCODED_LEN: usize = 20usize;
30242    fn deser(
30243        _version: MavlinkVersion,
30244        __input: &[u8],
30245    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30246        let avail_len = __input.len();
30247        let mut payload_buf = [0; Self::ENCODED_LEN];
30248        let mut buf = if avail_len < Self::ENCODED_LEN {
30249            payload_buf[0..avail_len].copy_from_slice(__input);
30250            Bytes::new(&payload_buf)
30251        } else {
30252            Bytes::new(__input)
30253        };
30254        let mut __struct = Self::default();
30255        __struct.safe_return = buf.get_i32_le();
30256        __struct.land = buf.get_i32_le();
30257        __struct.mission_next_item = buf.get_i32_le();
30258        __struct.mission_end = buf.get_i32_le();
30259        __struct.commanded_action = buf.get_i32_le();
30260        Ok(__struct)
30261    }
30262    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30263        let mut __tmp = BytesMut::new(bytes);
30264        #[allow(clippy::absurd_extreme_comparisons)]
30265        #[allow(unused_comparisons)]
30266        if __tmp.remaining() < Self::ENCODED_LEN {
30267            panic!(
30268                "buffer is too small (need {} bytes, but got {})",
30269                Self::ENCODED_LEN,
30270                __tmp.remaining(),
30271            )
30272        }
30273        __tmp.put_i32_le(self.safe_return);
30274        __tmp.put_i32_le(self.land);
30275        __tmp.put_i32_le(self.mission_next_item);
30276        __tmp.put_i32_le(self.mission_end);
30277        __tmp.put_i32_le(self.commanded_action);
30278        if matches!(version, MavlinkVersion::V2) {
30279            let len = __tmp.len();
30280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30281        } else {
30282            __tmp.len()
30283        }
30284    }
30285}
30286#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
30287#[doc = ""]
30288#[doc = "ID: 333"]
30289#[derive(Debug, Clone, PartialEq)]
30290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30292#[cfg_attr(feature = "ts", derive(TS))]
30293#[cfg_attr(feature = "ts", ts(export))]
30294pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30296    pub time_usec: u64,
30297    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
30298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30299    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30300    pub pos_x: [f32; 5],
30301    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
30302    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30303    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30304    pub pos_y: [f32; 5],
30305    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
30306    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30307    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30308    pub pos_z: [f32; 5],
30309    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
30310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30311    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30312    pub delta: [f32; 5],
30313    #[doc = "Yaw. Set to NaN for unchanged"]
30314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30315    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30316    pub pos_yaw: [f32; 5],
30317    #[doc = "Number of valid control points (up-to 5 points are possible)"]
30318    pub valid_points: u8,
30319}
30320impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30321    pub const ENCODED_LEN: usize = 109usize;
30322    pub const DEFAULT: Self = Self {
30323        time_usec: 0_u64,
30324        pos_x: [0.0_f32; 5usize],
30325        pos_y: [0.0_f32; 5usize],
30326        pos_z: [0.0_f32; 5usize],
30327        delta: [0.0_f32; 5usize],
30328        pos_yaw: [0.0_f32; 5usize],
30329        valid_points: 0_u8,
30330    };
30331    #[cfg(feature = "arbitrary")]
30332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30333        use arbitrary::{Arbitrary, Unstructured};
30334        let mut buf = [0u8; 1024];
30335        rng.fill_bytes(&mut buf);
30336        let mut unstructured = Unstructured::new(&buf);
30337        Self::arbitrary(&mut unstructured).unwrap_or_default()
30338    }
30339}
30340impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30341    fn default() -> Self {
30342        Self::DEFAULT.clone()
30343    }
30344}
30345impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
30346    type Message = MavMessage;
30347    const ID: u32 = 333u32;
30348    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
30349    const EXTRA_CRC: u8 = 231u8;
30350    const ENCODED_LEN: usize = 109usize;
30351    fn deser(
30352        _version: MavlinkVersion,
30353        __input: &[u8],
30354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30355        let avail_len = __input.len();
30356        let mut payload_buf = [0; Self::ENCODED_LEN];
30357        let mut buf = if avail_len < Self::ENCODED_LEN {
30358            payload_buf[0..avail_len].copy_from_slice(__input);
30359            Bytes::new(&payload_buf)
30360        } else {
30361            Bytes::new(__input)
30362        };
30363        let mut __struct = Self::default();
30364        __struct.time_usec = buf.get_u64_le();
30365        for v in &mut __struct.pos_x {
30366            let val = buf.get_f32_le();
30367            *v = val;
30368        }
30369        for v in &mut __struct.pos_y {
30370            let val = buf.get_f32_le();
30371            *v = val;
30372        }
30373        for v in &mut __struct.pos_z {
30374            let val = buf.get_f32_le();
30375            *v = val;
30376        }
30377        for v in &mut __struct.delta {
30378            let val = buf.get_f32_le();
30379            *v = val;
30380        }
30381        for v in &mut __struct.pos_yaw {
30382            let val = buf.get_f32_le();
30383            *v = val;
30384        }
30385        __struct.valid_points = buf.get_u8();
30386        Ok(__struct)
30387    }
30388    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30389        let mut __tmp = BytesMut::new(bytes);
30390        #[allow(clippy::absurd_extreme_comparisons)]
30391        #[allow(unused_comparisons)]
30392        if __tmp.remaining() < Self::ENCODED_LEN {
30393            panic!(
30394                "buffer is too small (need {} bytes, but got {})",
30395                Self::ENCODED_LEN,
30396                __tmp.remaining(),
30397            )
30398        }
30399        __tmp.put_u64_le(self.time_usec);
30400        for val in &self.pos_x {
30401            __tmp.put_f32_le(*val);
30402        }
30403        for val in &self.pos_y {
30404            __tmp.put_f32_le(*val);
30405        }
30406        for val in &self.pos_z {
30407            __tmp.put_f32_le(*val);
30408        }
30409        for val in &self.delta {
30410            __tmp.put_f32_le(*val);
30411        }
30412        for val in &self.pos_yaw {
30413            __tmp.put_f32_le(*val);
30414        }
30415        __tmp.put_u8(self.valid_points);
30416        if matches!(version, MavlinkVersion::V2) {
30417            let len = __tmp.len();
30418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30419        } else {
30420            __tmp.len()
30421        }
30422    }
30423}
30424#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
30425#[doc = ""]
30426#[doc = "ID: 332"]
30427#[derive(Debug, Clone, PartialEq)]
30428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30430#[cfg_attr(feature = "ts", derive(TS))]
30431#[cfg_attr(feature = "ts", ts(export))]
30432pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30433    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30434    pub time_usec: u64,
30435    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
30436    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30437    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30438    pub pos_x: [f32; 5],
30439    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
30440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30442    pub pos_y: [f32; 5],
30443    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
30444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30446    pub pos_z: [f32; 5],
30447    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
30448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30450    pub vel_x: [f32; 5],
30451    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
30452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30454    pub vel_y: [f32; 5],
30455    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
30456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30458    pub vel_z: [f32; 5],
30459    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
30460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30461    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30462    pub acc_x: [f32; 5],
30463    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
30464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30466    pub acc_y: [f32; 5],
30467    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
30468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30470    pub acc_z: [f32; 5],
30471    #[doc = "Yaw angle, set to NaN if not being used"]
30472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30474    pub pos_yaw: [f32; 5],
30475    #[doc = "Yaw rate, set to NaN if not being used"]
30476    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30477    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30478    pub vel_yaw: [f32; 5],
30479    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
30480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30481    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30482    pub command: [u16; 5],
30483    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
30484    pub valid_points: u8,
30485}
30486impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30487    pub const ENCODED_LEN: usize = 239usize;
30488    pub const DEFAULT: Self = Self {
30489        time_usec: 0_u64,
30490        pos_x: [0.0_f32; 5usize],
30491        pos_y: [0.0_f32; 5usize],
30492        pos_z: [0.0_f32; 5usize],
30493        vel_x: [0.0_f32; 5usize],
30494        vel_y: [0.0_f32; 5usize],
30495        vel_z: [0.0_f32; 5usize],
30496        acc_x: [0.0_f32; 5usize],
30497        acc_y: [0.0_f32; 5usize],
30498        acc_z: [0.0_f32; 5usize],
30499        pos_yaw: [0.0_f32; 5usize],
30500        vel_yaw: [0.0_f32; 5usize],
30501        command: [0_u16; 5usize],
30502        valid_points: 0_u8,
30503    };
30504    #[cfg(feature = "arbitrary")]
30505    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30506        use arbitrary::{Arbitrary, Unstructured};
30507        let mut buf = [0u8; 1024];
30508        rng.fill_bytes(&mut buf);
30509        let mut unstructured = Unstructured::new(&buf);
30510        Self::arbitrary(&mut unstructured).unwrap_or_default()
30511    }
30512}
30513impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30514    fn default() -> Self {
30515        Self::DEFAULT.clone()
30516    }
30517}
30518impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
30519    type Message = MavMessage;
30520    const ID: u32 = 332u32;
30521    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
30522    const EXTRA_CRC: u8 = 236u8;
30523    const ENCODED_LEN: usize = 239usize;
30524    fn deser(
30525        _version: MavlinkVersion,
30526        __input: &[u8],
30527    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30528        let avail_len = __input.len();
30529        let mut payload_buf = [0; Self::ENCODED_LEN];
30530        let mut buf = if avail_len < Self::ENCODED_LEN {
30531            payload_buf[0..avail_len].copy_from_slice(__input);
30532            Bytes::new(&payload_buf)
30533        } else {
30534            Bytes::new(__input)
30535        };
30536        let mut __struct = Self::default();
30537        __struct.time_usec = buf.get_u64_le();
30538        for v in &mut __struct.pos_x {
30539            let val = buf.get_f32_le();
30540            *v = val;
30541        }
30542        for v in &mut __struct.pos_y {
30543            let val = buf.get_f32_le();
30544            *v = val;
30545        }
30546        for v in &mut __struct.pos_z {
30547            let val = buf.get_f32_le();
30548            *v = val;
30549        }
30550        for v in &mut __struct.vel_x {
30551            let val = buf.get_f32_le();
30552            *v = val;
30553        }
30554        for v in &mut __struct.vel_y {
30555            let val = buf.get_f32_le();
30556            *v = val;
30557        }
30558        for v in &mut __struct.vel_z {
30559            let val = buf.get_f32_le();
30560            *v = val;
30561        }
30562        for v in &mut __struct.acc_x {
30563            let val = buf.get_f32_le();
30564            *v = val;
30565        }
30566        for v in &mut __struct.acc_y {
30567            let val = buf.get_f32_le();
30568            *v = val;
30569        }
30570        for v in &mut __struct.acc_z {
30571            let val = buf.get_f32_le();
30572            *v = val;
30573        }
30574        for v in &mut __struct.pos_yaw {
30575            let val = buf.get_f32_le();
30576            *v = val;
30577        }
30578        for v in &mut __struct.vel_yaw {
30579            let val = buf.get_f32_le();
30580            *v = val;
30581        }
30582        for v in &mut __struct.command {
30583            let val = buf.get_u16_le();
30584            *v = val;
30585        }
30586        __struct.valid_points = buf.get_u8();
30587        Ok(__struct)
30588    }
30589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30590        let mut __tmp = BytesMut::new(bytes);
30591        #[allow(clippy::absurd_extreme_comparisons)]
30592        #[allow(unused_comparisons)]
30593        if __tmp.remaining() < Self::ENCODED_LEN {
30594            panic!(
30595                "buffer is too small (need {} bytes, but got {})",
30596                Self::ENCODED_LEN,
30597                __tmp.remaining(),
30598            )
30599        }
30600        __tmp.put_u64_le(self.time_usec);
30601        for val in &self.pos_x {
30602            __tmp.put_f32_le(*val);
30603        }
30604        for val in &self.pos_y {
30605            __tmp.put_f32_le(*val);
30606        }
30607        for val in &self.pos_z {
30608            __tmp.put_f32_le(*val);
30609        }
30610        for val in &self.vel_x {
30611            __tmp.put_f32_le(*val);
30612        }
30613        for val in &self.vel_y {
30614            __tmp.put_f32_le(*val);
30615        }
30616        for val in &self.vel_z {
30617            __tmp.put_f32_le(*val);
30618        }
30619        for val in &self.acc_x {
30620            __tmp.put_f32_le(*val);
30621        }
30622        for val in &self.acc_y {
30623            __tmp.put_f32_le(*val);
30624        }
30625        for val in &self.acc_z {
30626            __tmp.put_f32_le(*val);
30627        }
30628        for val in &self.pos_yaw {
30629            __tmp.put_f32_le(*val);
30630        }
30631        for val in &self.vel_yaw {
30632            __tmp.put_f32_le(*val);
30633        }
30634        for val in &self.command {
30635            __tmp.put_u16_le(*val);
30636        }
30637        __tmp.put_u8(self.valid_points);
30638        if matches!(version, MavlinkVersion::V2) {
30639            let len = __tmp.len();
30640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30641        } else {
30642            __tmp.len()
30643        }
30644    }
30645}
30646#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
30647#[doc = ""]
30648#[doc = "ID: 385"]
30649#[derive(Debug, Clone, PartialEq)]
30650#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30651#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30652#[cfg_attr(feature = "ts", derive(TS))]
30653#[cfg_attr(feature = "ts", ts(export))]
30654pub struct TUNNEL_DATA {
30655    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30656    pub payload_type: MavTunnelPayloadType,
30657    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
30658    pub target_system: u8,
30659    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
30660    pub target_component: u8,
30661    #[doc = "Length of the data transported in payload"]
30662    pub payload_length: u8,
30663    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
30664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30665    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30666    pub payload: [u8; 128],
30667}
30668impl TUNNEL_DATA {
30669    pub const ENCODED_LEN: usize = 133usize;
30670    pub const DEFAULT: Self = Self {
30671        payload_type: MavTunnelPayloadType::DEFAULT,
30672        target_system: 0_u8,
30673        target_component: 0_u8,
30674        payload_length: 0_u8,
30675        payload: [0_u8; 128usize],
30676    };
30677    #[cfg(feature = "arbitrary")]
30678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30679        use arbitrary::{Arbitrary, Unstructured};
30680        let mut buf = [0u8; 1024];
30681        rng.fill_bytes(&mut buf);
30682        let mut unstructured = Unstructured::new(&buf);
30683        Self::arbitrary(&mut unstructured).unwrap_or_default()
30684    }
30685}
30686impl Default for TUNNEL_DATA {
30687    fn default() -> Self {
30688        Self::DEFAULT.clone()
30689    }
30690}
30691impl MessageData for TUNNEL_DATA {
30692    type Message = MavMessage;
30693    const ID: u32 = 385u32;
30694    const NAME: &'static str = "TUNNEL";
30695    const EXTRA_CRC: u8 = 147u8;
30696    const ENCODED_LEN: usize = 133usize;
30697    fn deser(
30698        _version: MavlinkVersion,
30699        __input: &[u8],
30700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30701        let avail_len = __input.len();
30702        let mut payload_buf = [0; Self::ENCODED_LEN];
30703        let mut buf = if avail_len < Self::ENCODED_LEN {
30704            payload_buf[0..avail_len].copy_from_slice(__input);
30705            Bytes::new(&payload_buf)
30706        } else {
30707            Bytes::new(__input)
30708        };
30709        let mut __struct = Self::default();
30710        let tmp = buf.get_u16_le();
30711        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
30712            ::mavlink_core::error::ParserError::InvalidEnum {
30713                enum_type: "MavTunnelPayloadType",
30714                value: tmp as u64,
30715            },
30716        )?;
30717        __struct.target_system = buf.get_u8();
30718        __struct.target_component = buf.get_u8();
30719        __struct.payload_length = buf.get_u8();
30720        for v in &mut __struct.payload {
30721            let val = buf.get_u8();
30722            *v = val;
30723        }
30724        Ok(__struct)
30725    }
30726    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30727        let mut __tmp = BytesMut::new(bytes);
30728        #[allow(clippy::absurd_extreme_comparisons)]
30729        #[allow(unused_comparisons)]
30730        if __tmp.remaining() < Self::ENCODED_LEN {
30731            panic!(
30732                "buffer is too small (need {} bytes, but got {})",
30733                Self::ENCODED_LEN,
30734                __tmp.remaining(),
30735            )
30736        }
30737        __tmp.put_u16_le(self.payload_type as u16);
30738        __tmp.put_u8(self.target_system);
30739        __tmp.put_u8(self.target_component);
30740        __tmp.put_u8(self.payload_length);
30741        for val in &self.payload {
30742            __tmp.put_u8(*val);
30743        }
30744        if matches!(version, MavlinkVersion::V2) {
30745            let len = __tmp.len();
30746            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30747        } else {
30748            __tmp.len()
30749        }
30750    }
30751}
30752#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
30753#[doc = ""]
30754#[doc = "ID: 311"]
30755#[derive(Debug, Clone, PartialEq)]
30756#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30758#[cfg_attr(feature = "ts", derive(TS))]
30759#[cfg_attr(feature = "ts", ts(export))]
30760pub struct UAVCAN_NODE_INFO_DATA {
30761    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30762    pub time_usec: u64,
30763    #[doc = "Time since the start-up of the node."]
30764    pub uptime_sec: u32,
30765    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
30766    pub sw_vcs_commit: u32,
30767    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
30768    #[cfg_attr(feature = "ts", ts(type = "string"))]
30769    pub name: CharArray<80>,
30770    #[doc = "Hardware major version number."]
30771    pub hw_version_major: u8,
30772    #[doc = "Hardware minor version number."]
30773    pub hw_version_minor: u8,
30774    #[doc = "Hardware unique 128-bit ID."]
30775    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30776    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30777    pub hw_unique_id: [u8; 16],
30778    #[doc = "Software major version number."]
30779    pub sw_version_major: u8,
30780    #[doc = "Software minor version number."]
30781    pub sw_version_minor: u8,
30782}
30783impl UAVCAN_NODE_INFO_DATA {
30784    pub const ENCODED_LEN: usize = 116usize;
30785    pub const DEFAULT: Self = Self {
30786        time_usec: 0_u64,
30787        uptime_sec: 0_u32,
30788        sw_vcs_commit: 0_u32,
30789        name: CharArray::new([0_u8; 80usize]),
30790        hw_version_major: 0_u8,
30791        hw_version_minor: 0_u8,
30792        hw_unique_id: [0_u8; 16usize],
30793        sw_version_major: 0_u8,
30794        sw_version_minor: 0_u8,
30795    };
30796    #[cfg(feature = "arbitrary")]
30797    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30798        use arbitrary::{Arbitrary, Unstructured};
30799        let mut buf = [0u8; 1024];
30800        rng.fill_bytes(&mut buf);
30801        let mut unstructured = Unstructured::new(&buf);
30802        Self::arbitrary(&mut unstructured).unwrap_or_default()
30803    }
30804}
30805impl Default for UAVCAN_NODE_INFO_DATA {
30806    fn default() -> Self {
30807        Self::DEFAULT.clone()
30808    }
30809}
30810impl MessageData for UAVCAN_NODE_INFO_DATA {
30811    type Message = MavMessage;
30812    const ID: u32 = 311u32;
30813    const NAME: &'static str = "UAVCAN_NODE_INFO";
30814    const EXTRA_CRC: u8 = 95u8;
30815    const ENCODED_LEN: usize = 116usize;
30816    fn deser(
30817        _version: MavlinkVersion,
30818        __input: &[u8],
30819    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30820        let avail_len = __input.len();
30821        let mut payload_buf = [0; Self::ENCODED_LEN];
30822        let mut buf = if avail_len < Self::ENCODED_LEN {
30823            payload_buf[0..avail_len].copy_from_slice(__input);
30824            Bytes::new(&payload_buf)
30825        } else {
30826            Bytes::new(__input)
30827        };
30828        let mut __struct = Self::default();
30829        __struct.time_usec = buf.get_u64_le();
30830        __struct.uptime_sec = buf.get_u32_le();
30831        __struct.sw_vcs_commit = buf.get_u32_le();
30832        let mut tmp = [0_u8; 80usize];
30833        for v in &mut tmp {
30834            *v = buf.get_u8();
30835        }
30836        __struct.name = CharArray::new(tmp);
30837        __struct.hw_version_major = buf.get_u8();
30838        __struct.hw_version_minor = buf.get_u8();
30839        for v in &mut __struct.hw_unique_id {
30840            let val = buf.get_u8();
30841            *v = val;
30842        }
30843        __struct.sw_version_major = buf.get_u8();
30844        __struct.sw_version_minor = buf.get_u8();
30845        Ok(__struct)
30846    }
30847    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30848        let mut __tmp = BytesMut::new(bytes);
30849        #[allow(clippy::absurd_extreme_comparisons)]
30850        #[allow(unused_comparisons)]
30851        if __tmp.remaining() < Self::ENCODED_LEN {
30852            panic!(
30853                "buffer is too small (need {} bytes, but got {})",
30854                Self::ENCODED_LEN,
30855                __tmp.remaining(),
30856            )
30857        }
30858        __tmp.put_u64_le(self.time_usec);
30859        __tmp.put_u32_le(self.uptime_sec);
30860        __tmp.put_u32_le(self.sw_vcs_commit);
30861        for val in &self.name {
30862            __tmp.put_u8(*val);
30863        }
30864        __tmp.put_u8(self.hw_version_major);
30865        __tmp.put_u8(self.hw_version_minor);
30866        for val in &self.hw_unique_id {
30867            __tmp.put_u8(*val);
30868        }
30869        __tmp.put_u8(self.sw_version_major);
30870        __tmp.put_u8(self.sw_version_minor);
30871        if matches!(version, MavlinkVersion::V2) {
30872            let len = __tmp.len();
30873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30874        } else {
30875            __tmp.len()
30876        }
30877    }
30878}
30879#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
30880#[doc = ""]
30881#[doc = "ID: 310"]
30882#[derive(Debug, Clone, PartialEq)]
30883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30885#[cfg_attr(feature = "ts", derive(TS))]
30886#[cfg_attr(feature = "ts", ts(export))]
30887pub struct UAVCAN_NODE_STATUS_DATA {
30888    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30889    pub time_usec: u64,
30890    #[doc = "Time since the start-up of the node."]
30891    pub uptime_sec: u32,
30892    #[doc = "Vendor-specific status information."]
30893    pub vendor_specific_status_code: u16,
30894    #[doc = "Generalized node health status."]
30895    pub health: UavcanNodeHealth,
30896    #[doc = "Generalized operating mode."]
30897    pub mode: UavcanNodeMode,
30898    #[doc = "Not used currently."]
30899    pub sub_mode: u8,
30900}
30901impl UAVCAN_NODE_STATUS_DATA {
30902    pub const ENCODED_LEN: usize = 17usize;
30903    pub const DEFAULT: Self = Self {
30904        time_usec: 0_u64,
30905        uptime_sec: 0_u32,
30906        vendor_specific_status_code: 0_u16,
30907        health: UavcanNodeHealth::DEFAULT,
30908        mode: UavcanNodeMode::DEFAULT,
30909        sub_mode: 0_u8,
30910    };
30911    #[cfg(feature = "arbitrary")]
30912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30913        use arbitrary::{Arbitrary, Unstructured};
30914        let mut buf = [0u8; 1024];
30915        rng.fill_bytes(&mut buf);
30916        let mut unstructured = Unstructured::new(&buf);
30917        Self::arbitrary(&mut unstructured).unwrap_or_default()
30918    }
30919}
30920impl Default for UAVCAN_NODE_STATUS_DATA {
30921    fn default() -> Self {
30922        Self::DEFAULT.clone()
30923    }
30924}
30925impl MessageData for UAVCAN_NODE_STATUS_DATA {
30926    type Message = MavMessage;
30927    const ID: u32 = 310u32;
30928    const NAME: &'static str = "UAVCAN_NODE_STATUS";
30929    const EXTRA_CRC: u8 = 28u8;
30930    const ENCODED_LEN: usize = 17usize;
30931    fn deser(
30932        _version: MavlinkVersion,
30933        __input: &[u8],
30934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30935        let avail_len = __input.len();
30936        let mut payload_buf = [0; Self::ENCODED_LEN];
30937        let mut buf = if avail_len < Self::ENCODED_LEN {
30938            payload_buf[0..avail_len].copy_from_slice(__input);
30939            Bytes::new(&payload_buf)
30940        } else {
30941            Bytes::new(__input)
30942        };
30943        let mut __struct = Self::default();
30944        __struct.time_usec = buf.get_u64_le();
30945        __struct.uptime_sec = buf.get_u32_le();
30946        __struct.vendor_specific_status_code = buf.get_u16_le();
30947        let tmp = buf.get_u8();
30948        __struct.health =
30949            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30950                enum_type: "UavcanNodeHealth",
30951                value: tmp as u64,
30952            })?;
30953        let tmp = buf.get_u8();
30954        __struct.mode =
30955            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30956                enum_type: "UavcanNodeMode",
30957                value: tmp as u64,
30958            })?;
30959        __struct.sub_mode = buf.get_u8();
30960        Ok(__struct)
30961    }
30962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30963        let mut __tmp = BytesMut::new(bytes);
30964        #[allow(clippy::absurd_extreme_comparisons)]
30965        #[allow(unused_comparisons)]
30966        if __tmp.remaining() < Self::ENCODED_LEN {
30967            panic!(
30968                "buffer is too small (need {} bytes, but got {})",
30969                Self::ENCODED_LEN,
30970                __tmp.remaining(),
30971            )
30972        }
30973        __tmp.put_u64_le(self.time_usec);
30974        __tmp.put_u32_le(self.uptime_sec);
30975        __tmp.put_u16_le(self.vendor_specific_status_code);
30976        __tmp.put_u8(self.health as u8);
30977        __tmp.put_u8(self.mode as u8);
30978        __tmp.put_u8(self.sub_mode);
30979        if matches!(version, MavlinkVersion::V2) {
30980            let len = __tmp.len();
30981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30982        } else {
30983            __tmp.len()
30984        }
30985    }
30986}
30987#[doc = "The global position resulting from GPS and sensor fusion."]
30988#[doc = ""]
30989#[doc = "ID: 340"]
30990#[derive(Debug, Clone, PartialEq)]
30991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30993#[cfg_attr(feature = "ts", derive(TS))]
30994#[cfg_attr(feature = "ts", ts(export))]
30995pub struct UTM_GLOBAL_POSITION_DATA {
30996    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
30997    pub time: u64,
30998    #[doc = "Latitude (WGS84)"]
30999    pub lat: i32,
31000    #[doc = "Longitude (WGS84)"]
31001    pub lon: i32,
31002    #[doc = "Altitude (WGS84)"]
31003    pub alt: i32,
31004    #[doc = "Altitude above ground"]
31005    pub relative_alt: i32,
31006    #[doc = "Next waypoint, latitude (WGS84)"]
31007    pub next_lat: i32,
31008    #[doc = "Next waypoint, longitude (WGS84)"]
31009    pub next_lon: i32,
31010    #[doc = "Next waypoint, altitude (WGS84)"]
31011    pub next_alt: i32,
31012    #[doc = "Ground X speed (latitude, positive north)"]
31013    pub vx: i16,
31014    #[doc = "Ground Y speed (longitude, positive east)"]
31015    pub vy: i16,
31016    #[doc = "Ground Z speed (altitude, positive down)"]
31017    pub vz: i16,
31018    #[doc = "Horizontal position uncertainty (standard deviation)"]
31019    pub h_acc: u16,
31020    #[doc = "Altitude uncertainty (standard deviation)"]
31021    pub v_acc: u16,
31022    #[doc = "Speed uncertainty (standard deviation)"]
31023    pub vel_acc: u16,
31024    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
31025    pub update_rate: u16,
31026    #[doc = "Unique UAS ID."]
31027    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31028    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31029    pub uas_id: [u8; 18],
31030    #[doc = "Flight state"]
31031    pub flight_state: UtmFlightState,
31032    #[doc = "Bitwise OR combination of the data available flags."]
31033    pub flags: UtmDataAvailFlags,
31034}
31035impl UTM_GLOBAL_POSITION_DATA {
31036    pub const ENCODED_LEN: usize = 70usize;
31037    pub const DEFAULT: Self = Self {
31038        time: 0_u64,
31039        lat: 0_i32,
31040        lon: 0_i32,
31041        alt: 0_i32,
31042        relative_alt: 0_i32,
31043        next_lat: 0_i32,
31044        next_lon: 0_i32,
31045        next_alt: 0_i32,
31046        vx: 0_i16,
31047        vy: 0_i16,
31048        vz: 0_i16,
31049        h_acc: 0_u16,
31050        v_acc: 0_u16,
31051        vel_acc: 0_u16,
31052        update_rate: 0_u16,
31053        uas_id: [0_u8; 18usize],
31054        flight_state: UtmFlightState::DEFAULT,
31055        flags: UtmDataAvailFlags::DEFAULT,
31056    };
31057    #[cfg(feature = "arbitrary")]
31058    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31059        use arbitrary::{Arbitrary, Unstructured};
31060        let mut buf = [0u8; 1024];
31061        rng.fill_bytes(&mut buf);
31062        let mut unstructured = Unstructured::new(&buf);
31063        Self::arbitrary(&mut unstructured).unwrap_or_default()
31064    }
31065}
31066impl Default for UTM_GLOBAL_POSITION_DATA {
31067    fn default() -> Self {
31068        Self::DEFAULT.clone()
31069    }
31070}
31071impl MessageData for UTM_GLOBAL_POSITION_DATA {
31072    type Message = MavMessage;
31073    const ID: u32 = 340u32;
31074    const NAME: &'static str = "UTM_GLOBAL_POSITION";
31075    const EXTRA_CRC: u8 = 99u8;
31076    const ENCODED_LEN: usize = 70usize;
31077    fn deser(
31078        _version: MavlinkVersion,
31079        __input: &[u8],
31080    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31081        let avail_len = __input.len();
31082        let mut payload_buf = [0; Self::ENCODED_LEN];
31083        let mut buf = if avail_len < Self::ENCODED_LEN {
31084            payload_buf[0..avail_len].copy_from_slice(__input);
31085            Bytes::new(&payload_buf)
31086        } else {
31087            Bytes::new(__input)
31088        };
31089        let mut __struct = Self::default();
31090        __struct.time = buf.get_u64_le();
31091        __struct.lat = buf.get_i32_le();
31092        __struct.lon = buf.get_i32_le();
31093        __struct.alt = buf.get_i32_le();
31094        __struct.relative_alt = buf.get_i32_le();
31095        __struct.next_lat = buf.get_i32_le();
31096        __struct.next_lon = buf.get_i32_le();
31097        __struct.next_alt = buf.get_i32_le();
31098        __struct.vx = buf.get_i16_le();
31099        __struct.vy = buf.get_i16_le();
31100        __struct.vz = buf.get_i16_le();
31101        __struct.h_acc = buf.get_u16_le();
31102        __struct.v_acc = buf.get_u16_le();
31103        __struct.vel_acc = buf.get_u16_le();
31104        __struct.update_rate = buf.get_u16_le();
31105        for v in &mut __struct.uas_id {
31106            let val = buf.get_u8();
31107            *v = val;
31108        }
31109        let tmp = buf.get_u8();
31110        __struct.flight_state =
31111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31112                enum_type: "UtmFlightState",
31113                value: tmp as u64,
31114            })?;
31115        let tmp = buf.get_u8();
31116        __struct.flags = UtmDataAvailFlags::from_bits(tmp).ok_or(
31117            ::mavlink_core::error::ParserError::InvalidFlag {
31118                flag_type: "UtmDataAvailFlags",
31119                value: tmp as u64,
31120            },
31121        )?;
31122        Ok(__struct)
31123    }
31124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31125        let mut __tmp = BytesMut::new(bytes);
31126        #[allow(clippy::absurd_extreme_comparisons)]
31127        #[allow(unused_comparisons)]
31128        if __tmp.remaining() < Self::ENCODED_LEN {
31129            panic!(
31130                "buffer is too small (need {} bytes, but got {})",
31131                Self::ENCODED_LEN,
31132                __tmp.remaining(),
31133            )
31134        }
31135        __tmp.put_u64_le(self.time);
31136        __tmp.put_i32_le(self.lat);
31137        __tmp.put_i32_le(self.lon);
31138        __tmp.put_i32_le(self.alt);
31139        __tmp.put_i32_le(self.relative_alt);
31140        __tmp.put_i32_le(self.next_lat);
31141        __tmp.put_i32_le(self.next_lon);
31142        __tmp.put_i32_le(self.next_alt);
31143        __tmp.put_i16_le(self.vx);
31144        __tmp.put_i16_le(self.vy);
31145        __tmp.put_i16_le(self.vz);
31146        __tmp.put_u16_le(self.h_acc);
31147        __tmp.put_u16_le(self.v_acc);
31148        __tmp.put_u16_le(self.vel_acc);
31149        __tmp.put_u16_le(self.update_rate);
31150        for val in &self.uas_id {
31151            __tmp.put_u8(*val);
31152        }
31153        __tmp.put_u8(self.flight_state as u8);
31154        __tmp.put_u8(self.flags.bits());
31155        if matches!(version, MavlinkVersion::V2) {
31156            let len = __tmp.len();
31157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31158        } else {
31159            __tmp.len()
31160        }
31161    }
31162}
31163#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
31164#[doc = ""]
31165#[doc = "ID: 248"]
31166#[derive(Debug, Clone, PartialEq)]
31167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31169#[cfg_attr(feature = "ts", derive(TS))]
31170#[cfg_attr(feature = "ts", ts(export))]
31171pub struct V2_EXTENSION_DATA {
31172    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31173    pub message_type: u16,
31174    #[doc = "Network ID (0 for broadcast)"]
31175    pub target_network: u8,
31176    #[doc = "System ID (0 for broadcast)"]
31177    pub target_system: u8,
31178    #[doc = "Component ID (0 for broadcast)"]
31179    pub target_component: u8,
31180    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
31181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31182    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31183    pub payload: [u8; 249],
31184}
31185impl V2_EXTENSION_DATA {
31186    pub const ENCODED_LEN: usize = 254usize;
31187    pub const DEFAULT: Self = Self {
31188        message_type: 0_u16,
31189        target_network: 0_u8,
31190        target_system: 0_u8,
31191        target_component: 0_u8,
31192        payload: [0_u8; 249usize],
31193    };
31194    #[cfg(feature = "arbitrary")]
31195    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31196        use arbitrary::{Arbitrary, Unstructured};
31197        let mut buf = [0u8; 1024];
31198        rng.fill_bytes(&mut buf);
31199        let mut unstructured = Unstructured::new(&buf);
31200        Self::arbitrary(&mut unstructured).unwrap_or_default()
31201    }
31202}
31203impl Default for V2_EXTENSION_DATA {
31204    fn default() -> Self {
31205        Self::DEFAULT.clone()
31206    }
31207}
31208impl MessageData for V2_EXTENSION_DATA {
31209    type Message = MavMessage;
31210    const ID: u32 = 248u32;
31211    const NAME: &'static str = "V2_EXTENSION";
31212    const EXTRA_CRC: u8 = 8u8;
31213    const ENCODED_LEN: usize = 254usize;
31214    fn deser(
31215        _version: MavlinkVersion,
31216        __input: &[u8],
31217    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31218        let avail_len = __input.len();
31219        let mut payload_buf = [0; Self::ENCODED_LEN];
31220        let mut buf = if avail_len < Self::ENCODED_LEN {
31221            payload_buf[0..avail_len].copy_from_slice(__input);
31222            Bytes::new(&payload_buf)
31223        } else {
31224            Bytes::new(__input)
31225        };
31226        let mut __struct = Self::default();
31227        __struct.message_type = buf.get_u16_le();
31228        __struct.target_network = buf.get_u8();
31229        __struct.target_system = buf.get_u8();
31230        __struct.target_component = buf.get_u8();
31231        for v in &mut __struct.payload {
31232            let val = buf.get_u8();
31233            *v = val;
31234        }
31235        Ok(__struct)
31236    }
31237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31238        let mut __tmp = BytesMut::new(bytes);
31239        #[allow(clippy::absurd_extreme_comparisons)]
31240        #[allow(unused_comparisons)]
31241        if __tmp.remaining() < Self::ENCODED_LEN {
31242            panic!(
31243                "buffer is too small (need {} bytes, but got {})",
31244                Self::ENCODED_LEN,
31245                __tmp.remaining(),
31246            )
31247        }
31248        __tmp.put_u16_le(self.message_type);
31249        __tmp.put_u8(self.target_network);
31250        __tmp.put_u8(self.target_system);
31251        __tmp.put_u8(self.target_component);
31252        for val in &self.payload {
31253            __tmp.put_u8(*val);
31254        }
31255        if matches!(version, MavlinkVersion::V2) {
31256            let len = __tmp.len();
31257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31258        } else {
31259            __tmp.len()
31260        }
31261    }
31262}
31263#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
31264#[doc = ""]
31265#[doc = "ID: 74"]
31266#[derive(Debug, Clone, PartialEq)]
31267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31269#[cfg_attr(feature = "ts", derive(TS))]
31270#[cfg_attr(feature = "ts", ts(export))]
31271pub struct VFR_HUD_DATA {
31272    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
31273    pub airspeed: f32,
31274    #[doc = "Current ground speed."]
31275    pub groundspeed: f32,
31276    #[doc = "Current altitude (MSL)."]
31277    pub alt: f32,
31278    #[doc = "Current climb rate."]
31279    pub climb: f32,
31280    #[doc = "Current heading in compass units (0-360, 0=north)."]
31281    pub heading: i16,
31282    #[doc = "Current throttle setting (0 to 100)."]
31283    pub throttle: u16,
31284}
31285impl VFR_HUD_DATA {
31286    pub const ENCODED_LEN: usize = 20usize;
31287    pub const DEFAULT: Self = Self {
31288        airspeed: 0.0_f32,
31289        groundspeed: 0.0_f32,
31290        alt: 0.0_f32,
31291        climb: 0.0_f32,
31292        heading: 0_i16,
31293        throttle: 0_u16,
31294    };
31295    #[cfg(feature = "arbitrary")]
31296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31297        use arbitrary::{Arbitrary, Unstructured};
31298        let mut buf = [0u8; 1024];
31299        rng.fill_bytes(&mut buf);
31300        let mut unstructured = Unstructured::new(&buf);
31301        Self::arbitrary(&mut unstructured).unwrap_or_default()
31302    }
31303}
31304impl Default for VFR_HUD_DATA {
31305    fn default() -> Self {
31306        Self::DEFAULT.clone()
31307    }
31308}
31309impl MessageData for VFR_HUD_DATA {
31310    type Message = MavMessage;
31311    const ID: u32 = 74u32;
31312    const NAME: &'static str = "VFR_HUD";
31313    const EXTRA_CRC: u8 = 20u8;
31314    const ENCODED_LEN: usize = 20usize;
31315    fn deser(
31316        _version: MavlinkVersion,
31317        __input: &[u8],
31318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31319        let avail_len = __input.len();
31320        let mut payload_buf = [0; Self::ENCODED_LEN];
31321        let mut buf = if avail_len < Self::ENCODED_LEN {
31322            payload_buf[0..avail_len].copy_from_slice(__input);
31323            Bytes::new(&payload_buf)
31324        } else {
31325            Bytes::new(__input)
31326        };
31327        let mut __struct = Self::default();
31328        __struct.airspeed = buf.get_f32_le();
31329        __struct.groundspeed = buf.get_f32_le();
31330        __struct.alt = buf.get_f32_le();
31331        __struct.climb = buf.get_f32_le();
31332        __struct.heading = buf.get_i16_le();
31333        __struct.throttle = buf.get_u16_le();
31334        Ok(__struct)
31335    }
31336    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31337        let mut __tmp = BytesMut::new(bytes);
31338        #[allow(clippy::absurd_extreme_comparisons)]
31339        #[allow(unused_comparisons)]
31340        if __tmp.remaining() < Self::ENCODED_LEN {
31341            panic!(
31342                "buffer is too small (need {} bytes, but got {})",
31343                Self::ENCODED_LEN,
31344                __tmp.remaining(),
31345            )
31346        }
31347        __tmp.put_f32_le(self.airspeed);
31348        __tmp.put_f32_le(self.groundspeed);
31349        __tmp.put_f32_le(self.alt);
31350        __tmp.put_f32_le(self.climb);
31351        __tmp.put_i16_le(self.heading);
31352        __tmp.put_u16_le(self.throttle);
31353        if matches!(version, MavlinkVersion::V2) {
31354            let len = __tmp.len();
31355            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31356        } else {
31357            __tmp.len()
31358        }
31359    }
31360}
31361#[doc = "Vibration levels and accelerometer clipping."]
31362#[doc = ""]
31363#[doc = "ID: 241"]
31364#[derive(Debug, Clone, PartialEq)]
31365#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31366#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31367#[cfg_attr(feature = "ts", derive(TS))]
31368#[cfg_attr(feature = "ts", ts(export))]
31369pub struct VIBRATION_DATA {
31370    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31371    pub time_usec: u64,
31372    #[doc = "Vibration levels on X-axis"]
31373    pub vibration_x: f32,
31374    #[doc = "Vibration levels on Y-axis"]
31375    pub vibration_y: f32,
31376    #[doc = "Vibration levels on Z-axis"]
31377    pub vibration_z: f32,
31378    #[doc = "first accelerometer clipping count"]
31379    pub clipping_0: u32,
31380    #[doc = "second accelerometer clipping count"]
31381    pub clipping_1: u32,
31382    #[doc = "third accelerometer clipping count"]
31383    pub clipping_2: u32,
31384}
31385impl VIBRATION_DATA {
31386    pub const ENCODED_LEN: usize = 32usize;
31387    pub const DEFAULT: Self = Self {
31388        time_usec: 0_u64,
31389        vibration_x: 0.0_f32,
31390        vibration_y: 0.0_f32,
31391        vibration_z: 0.0_f32,
31392        clipping_0: 0_u32,
31393        clipping_1: 0_u32,
31394        clipping_2: 0_u32,
31395    };
31396    #[cfg(feature = "arbitrary")]
31397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31398        use arbitrary::{Arbitrary, Unstructured};
31399        let mut buf = [0u8; 1024];
31400        rng.fill_bytes(&mut buf);
31401        let mut unstructured = Unstructured::new(&buf);
31402        Self::arbitrary(&mut unstructured).unwrap_or_default()
31403    }
31404}
31405impl Default for VIBRATION_DATA {
31406    fn default() -> Self {
31407        Self::DEFAULT.clone()
31408    }
31409}
31410impl MessageData for VIBRATION_DATA {
31411    type Message = MavMessage;
31412    const ID: u32 = 241u32;
31413    const NAME: &'static str = "VIBRATION";
31414    const EXTRA_CRC: u8 = 90u8;
31415    const ENCODED_LEN: usize = 32usize;
31416    fn deser(
31417        _version: MavlinkVersion,
31418        __input: &[u8],
31419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31420        let avail_len = __input.len();
31421        let mut payload_buf = [0; Self::ENCODED_LEN];
31422        let mut buf = if avail_len < Self::ENCODED_LEN {
31423            payload_buf[0..avail_len].copy_from_slice(__input);
31424            Bytes::new(&payload_buf)
31425        } else {
31426            Bytes::new(__input)
31427        };
31428        let mut __struct = Self::default();
31429        __struct.time_usec = buf.get_u64_le();
31430        __struct.vibration_x = buf.get_f32_le();
31431        __struct.vibration_y = buf.get_f32_le();
31432        __struct.vibration_z = buf.get_f32_le();
31433        __struct.clipping_0 = buf.get_u32_le();
31434        __struct.clipping_1 = buf.get_u32_le();
31435        __struct.clipping_2 = buf.get_u32_le();
31436        Ok(__struct)
31437    }
31438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31439        let mut __tmp = BytesMut::new(bytes);
31440        #[allow(clippy::absurd_extreme_comparisons)]
31441        #[allow(unused_comparisons)]
31442        if __tmp.remaining() < Self::ENCODED_LEN {
31443            panic!(
31444                "buffer is too small (need {} bytes, but got {})",
31445                Self::ENCODED_LEN,
31446                __tmp.remaining(),
31447            )
31448        }
31449        __tmp.put_u64_le(self.time_usec);
31450        __tmp.put_f32_le(self.vibration_x);
31451        __tmp.put_f32_le(self.vibration_y);
31452        __tmp.put_f32_le(self.vibration_z);
31453        __tmp.put_u32_le(self.clipping_0);
31454        __tmp.put_u32_le(self.clipping_1);
31455        __tmp.put_u32_le(self.clipping_2);
31456        if matches!(version, MavlinkVersion::V2) {
31457            let len = __tmp.len();
31458            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31459        } else {
31460            __tmp.len()
31461        }
31462    }
31463}
31464#[doc = "Global position estimate from a Vicon motion system source."]
31465#[doc = ""]
31466#[doc = "ID: 104"]
31467#[derive(Debug, Clone, PartialEq)]
31468#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31469#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31470#[cfg_attr(feature = "ts", derive(TS))]
31471#[cfg_attr(feature = "ts", ts(export))]
31472pub struct VICON_POSITION_ESTIMATE_DATA {
31473    #[doc = "Timestamp (UNIX time or time since system boot)"]
31474    pub usec: u64,
31475    #[doc = "Global X position"]
31476    pub x: f32,
31477    #[doc = "Global Y position"]
31478    pub y: f32,
31479    #[doc = "Global Z position"]
31480    pub z: f32,
31481    #[doc = "Roll angle"]
31482    pub roll: f32,
31483    #[doc = "Pitch angle"]
31484    pub pitch: f32,
31485    #[doc = "Yaw angle"]
31486    pub yaw: f32,
31487    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31488    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31489    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31490    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31491    pub covariance: [f32; 21],
31492}
31493impl VICON_POSITION_ESTIMATE_DATA {
31494    pub const ENCODED_LEN: usize = 116usize;
31495    pub const DEFAULT: Self = Self {
31496        usec: 0_u64,
31497        x: 0.0_f32,
31498        y: 0.0_f32,
31499        z: 0.0_f32,
31500        roll: 0.0_f32,
31501        pitch: 0.0_f32,
31502        yaw: 0.0_f32,
31503        covariance: [0.0_f32; 21usize],
31504    };
31505    #[cfg(feature = "arbitrary")]
31506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31507        use arbitrary::{Arbitrary, Unstructured};
31508        let mut buf = [0u8; 1024];
31509        rng.fill_bytes(&mut buf);
31510        let mut unstructured = Unstructured::new(&buf);
31511        Self::arbitrary(&mut unstructured).unwrap_or_default()
31512    }
31513}
31514impl Default for VICON_POSITION_ESTIMATE_DATA {
31515    fn default() -> Self {
31516        Self::DEFAULT.clone()
31517    }
31518}
31519impl MessageData for VICON_POSITION_ESTIMATE_DATA {
31520    type Message = MavMessage;
31521    const ID: u32 = 104u32;
31522    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
31523    const EXTRA_CRC: u8 = 56u8;
31524    const ENCODED_LEN: usize = 116usize;
31525    fn deser(
31526        _version: MavlinkVersion,
31527        __input: &[u8],
31528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31529        let avail_len = __input.len();
31530        let mut payload_buf = [0; Self::ENCODED_LEN];
31531        let mut buf = if avail_len < Self::ENCODED_LEN {
31532            payload_buf[0..avail_len].copy_from_slice(__input);
31533            Bytes::new(&payload_buf)
31534        } else {
31535            Bytes::new(__input)
31536        };
31537        let mut __struct = Self::default();
31538        __struct.usec = buf.get_u64_le();
31539        __struct.x = buf.get_f32_le();
31540        __struct.y = buf.get_f32_le();
31541        __struct.z = buf.get_f32_le();
31542        __struct.roll = buf.get_f32_le();
31543        __struct.pitch = buf.get_f32_le();
31544        __struct.yaw = buf.get_f32_le();
31545        for v in &mut __struct.covariance {
31546            let val = buf.get_f32_le();
31547            *v = val;
31548        }
31549        Ok(__struct)
31550    }
31551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31552        let mut __tmp = BytesMut::new(bytes);
31553        #[allow(clippy::absurd_extreme_comparisons)]
31554        #[allow(unused_comparisons)]
31555        if __tmp.remaining() < Self::ENCODED_LEN {
31556            panic!(
31557                "buffer is too small (need {} bytes, but got {})",
31558                Self::ENCODED_LEN,
31559                __tmp.remaining(),
31560            )
31561        }
31562        __tmp.put_u64_le(self.usec);
31563        __tmp.put_f32_le(self.x);
31564        __tmp.put_f32_le(self.y);
31565        __tmp.put_f32_le(self.z);
31566        __tmp.put_f32_le(self.roll);
31567        __tmp.put_f32_le(self.pitch);
31568        __tmp.put_f32_le(self.yaw);
31569        if matches!(version, MavlinkVersion::V2) {
31570            for val in &self.covariance {
31571                __tmp.put_f32_le(*val);
31572            }
31573            let len = __tmp.len();
31574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31575        } else {
31576            __tmp.len()
31577        }
31578    }
31579}
31580#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
31581#[doc = ""]
31582#[doc = "ID: 269"]
31583#[derive(Debug, Clone, PartialEq)]
31584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31586#[cfg_attr(feature = "ts", derive(TS))]
31587#[cfg_attr(feature = "ts", ts(export))]
31588pub struct VIDEO_STREAM_INFORMATION_DATA {
31589    #[doc = "Frame rate."]
31590    pub framerate: f32,
31591    #[doc = "Bit rate."]
31592    pub bitrate: u32,
31593    #[doc = "Bitmap of stream status flags."]
31594    pub flags: VideoStreamStatusFlags,
31595    #[doc = "Horizontal resolution."]
31596    pub resolution_h: u16,
31597    #[doc = "Vertical resolution."]
31598    pub resolution_v: u16,
31599    #[doc = "Video image rotation clockwise."]
31600    pub rotation: u16,
31601    #[doc = "Horizontal Field of view."]
31602    pub hfov: u16,
31603    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31604    pub stream_id: u8,
31605    #[doc = "Number of streams available."]
31606    pub count: u8,
31607    #[doc = "Type of stream."]
31608    pub mavtype: VideoStreamType,
31609    #[doc = "Stream name."]
31610    #[cfg_attr(feature = "ts", ts(type = "string"))]
31611    pub name: CharArray<32>,
31612    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
31613    #[cfg_attr(feature = "ts", ts(type = "string"))]
31614    pub uri: CharArray<160>,
31615    #[doc = "Encoding of stream."]
31616    #[cfg_attr(feature = "serde", serde(default))]
31617    pub encoding: VideoStreamEncoding,
31618    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31620    pub camera_device_id: u8,
31621}
31622impl VIDEO_STREAM_INFORMATION_DATA {
31623    pub const ENCODED_LEN: usize = 215usize;
31624    pub const DEFAULT: Self = Self {
31625        framerate: 0.0_f32,
31626        bitrate: 0_u32,
31627        flags: VideoStreamStatusFlags::DEFAULT,
31628        resolution_h: 0_u16,
31629        resolution_v: 0_u16,
31630        rotation: 0_u16,
31631        hfov: 0_u16,
31632        stream_id: 0_u8,
31633        count: 0_u8,
31634        mavtype: VideoStreamType::DEFAULT,
31635        name: CharArray::new([0_u8; 32usize]),
31636        uri: CharArray::new([0_u8; 160usize]),
31637        encoding: VideoStreamEncoding::DEFAULT,
31638        camera_device_id: 0_u8,
31639    };
31640    #[cfg(feature = "arbitrary")]
31641    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31642        use arbitrary::{Arbitrary, Unstructured};
31643        let mut buf = [0u8; 1024];
31644        rng.fill_bytes(&mut buf);
31645        let mut unstructured = Unstructured::new(&buf);
31646        Self::arbitrary(&mut unstructured).unwrap_or_default()
31647    }
31648}
31649impl Default for VIDEO_STREAM_INFORMATION_DATA {
31650    fn default() -> Self {
31651        Self::DEFAULT.clone()
31652    }
31653}
31654impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
31655    type Message = MavMessage;
31656    const ID: u32 = 269u32;
31657    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
31658    const EXTRA_CRC: u8 = 109u8;
31659    const ENCODED_LEN: usize = 215usize;
31660    fn deser(
31661        _version: MavlinkVersion,
31662        __input: &[u8],
31663    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31664        let avail_len = __input.len();
31665        let mut payload_buf = [0; Self::ENCODED_LEN];
31666        let mut buf = if avail_len < Self::ENCODED_LEN {
31667            payload_buf[0..avail_len].copy_from_slice(__input);
31668            Bytes::new(&payload_buf)
31669        } else {
31670            Bytes::new(__input)
31671        };
31672        let mut __struct = Self::default();
31673        __struct.framerate = buf.get_f32_le();
31674        __struct.bitrate = buf.get_u32_le();
31675        let tmp = buf.get_u16_le();
31676        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
31677            ::mavlink_core::error::ParserError::InvalidFlag {
31678                flag_type: "VideoStreamStatusFlags",
31679                value: tmp as u64,
31680            },
31681        )?;
31682        __struct.resolution_h = buf.get_u16_le();
31683        __struct.resolution_v = buf.get_u16_le();
31684        __struct.rotation = buf.get_u16_le();
31685        __struct.hfov = buf.get_u16_le();
31686        __struct.stream_id = buf.get_u8();
31687        __struct.count = buf.get_u8();
31688        let tmp = buf.get_u8();
31689        __struct.mavtype =
31690            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31691                enum_type: "VideoStreamType",
31692                value: tmp as u64,
31693            })?;
31694        let mut tmp = [0_u8; 32usize];
31695        for v in &mut tmp {
31696            *v = buf.get_u8();
31697        }
31698        __struct.name = CharArray::new(tmp);
31699        let mut tmp = [0_u8; 160usize];
31700        for v in &mut tmp {
31701            *v = buf.get_u8();
31702        }
31703        __struct.uri = CharArray::new(tmp);
31704        let tmp = buf.get_u8();
31705        __struct.encoding =
31706            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31707                enum_type: "VideoStreamEncoding",
31708                value: tmp as u64,
31709            })?;
31710        __struct.camera_device_id = buf.get_u8();
31711        Ok(__struct)
31712    }
31713    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31714        let mut __tmp = BytesMut::new(bytes);
31715        #[allow(clippy::absurd_extreme_comparisons)]
31716        #[allow(unused_comparisons)]
31717        if __tmp.remaining() < Self::ENCODED_LEN {
31718            panic!(
31719                "buffer is too small (need {} bytes, but got {})",
31720                Self::ENCODED_LEN,
31721                __tmp.remaining(),
31722            )
31723        }
31724        __tmp.put_f32_le(self.framerate);
31725        __tmp.put_u32_le(self.bitrate);
31726        __tmp.put_u16_le(self.flags.bits());
31727        __tmp.put_u16_le(self.resolution_h);
31728        __tmp.put_u16_le(self.resolution_v);
31729        __tmp.put_u16_le(self.rotation);
31730        __tmp.put_u16_le(self.hfov);
31731        __tmp.put_u8(self.stream_id);
31732        __tmp.put_u8(self.count);
31733        __tmp.put_u8(self.mavtype as u8);
31734        for val in &self.name {
31735            __tmp.put_u8(*val);
31736        }
31737        for val in &self.uri {
31738            __tmp.put_u8(*val);
31739        }
31740        if matches!(version, MavlinkVersion::V2) {
31741            __tmp.put_u8(self.encoding as u8);
31742            __tmp.put_u8(self.camera_device_id);
31743            let len = __tmp.len();
31744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31745        } else {
31746            __tmp.len()
31747        }
31748    }
31749}
31750#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
31751#[doc = ""]
31752#[doc = "ID: 270"]
31753#[derive(Debug, Clone, PartialEq)]
31754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31756#[cfg_attr(feature = "ts", derive(TS))]
31757#[cfg_attr(feature = "ts", ts(export))]
31758pub struct VIDEO_STREAM_STATUS_DATA {
31759    #[doc = "Frame rate"]
31760    pub framerate: f32,
31761    #[doc = "Bit rate"]
31762    pub bitrate: u32,
31763    #[doc = "Bitmap of stream status flags"]
31764    pub flags: VideoStreamStatusFlags,
31765    #[doc = "Horizontal resolution"]
31766    pub resolution_h: u16,
31767    #[doc = "Vertical resolution"]
31768    pub resolution_v: u16,
31769    #[doc = "Video image rotation clockwise"]
31770    pub rotation: u16,
31771    #[doc = "Horizontal Field of view"]
31772    pub hfov: u16,
31773    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
31774    pub stream_id: u8,
31775    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
31776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31777    pub camera_device_id: u8,
31778}
31779impl VIDEO_STREAM_STATUS_DATA {
31780    pub const ENCODED_LEN: usize = 20usize;
31781    pub const DEFAULT: Self = Self {
31782        framerate: 0.0_f32,
31783        bitrate: 0_u32,
31784        flags: VideoStreamStatusFlags::DEFAULT,
31785        resolution_h: 0_u16,
31786        resolution_v: 0_u16,
31787        rotation: 0_u16,
31788        hfov: 0_u16,
31789        stream_id: 0_u8,
31790        camera_device_id: 0_u8,
31791    };
31792    #[cfg(feature = "arbitrary")]
31793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31794        use arbitrary::{Arbitrary, Unstructured};
31795        let mut buf = [0u8; 1024];
31796        rng.fill_bytes(&mut buf);
31797        let mut unstructured = Unstructured::new(&buf);
31798        Self::arbitrary(&mut unstructured).unwrap_or_default()
31799    }
31800}
31801impl Default for VIDEO_STREAM_STATUS_DATA {
31802    fn default() -> Self {
31803        Self::DEFAULT.clone()
31804    }
31805}
31806impl MessageData for VIDEO_STREAM_STATUS_DATA {
31807    type Message = MavMessage;
31808    const ID: u32 = 270u32;
31809    const NAME: &'static str = "VIDEO_STREAM_STATUS";
31810    const EXTRA_CRC: u8 = 59u8;
31811    const ENCODED_LEN: usize = 20usize;
31812    fn deser(
31813        _version: MavlinkVersion,
31814        __input: &[u8],
31815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31816        let avail_len = __input.len();
31817        let mut payload_buf = [0; Self::ENCODED_LEN];
31818        let mut buf = if avail_len < Self::ENCODED_LEN {
31819            payload_buf[0..avail_len].copy_from_slice(__input);
31820            Bytes::new(&payload_buf)
31821        } else {
31822            Bytes::new(__input)
31823        };
31824        let mut __struct = Self::default();
31825        __struct.framerate = buf.get_f32_le();
31826        __struct.bitrate = buf.get_u32_le();
31827        let tmp = buf.get_u16_le();
31828        __struct.flags = VideoStreamStatusFlags::from_bits(tmp).ok_or(
31829            ::mavlink_core::error::ParserError::InvalidFlag {
31830                flag_type: "VideoStreamStatusFlags",
31831                value: tmp as u64,
31832            },
31833        )?;
31834        __struct.resolution_h = buf.get_u16_le();
31835        __struct.resolution_v = buf.get_u16_le();
31836        __struct.rotation = buf.get_u16_le();
31837        __struct.hfov = buf.get_u16_le();
31838        __struct.stream_id = buf.get_u8();
31839        __struct.camera_device_id = buf.get_u8();
31840        Ok(__struct)
31841    }
31842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31843        let mut __tmp = BytesMut::new(bytes);
31844        #[allow(clippy::absurd_extreme_comparisons)]
31845        #[allow(unused_comparisons)]
31846        if __tmp.remaining() < Self::ENCODED_LEN {
31847            panic!(
31848                "buffer is too small (need {} bytes, but got {})",
31849                Self::ENCODED_LEN,
31850                __tmp.remaining(),
31851            )
31852        }
31853        __tmp.put_f32_le(self.framerate);
31854        __tmp.put_u32_le(self.bitrate);
31855        __tmp.put_u16_le(self.flags.bits());
31856        __tmp.put_u16_le(self.resolution_h);
31857        __tmp.put_u16_le(self.resolution_v);
31858        __tmp.put_u16_le(self.rotation);
31859        __tmp.put_u16_le(self.hfov);
31860        __tmp.put_u8(self.stream_id);
31861        if matches!(version, MavlinkVersion::V2) {
31862            __tmp.put_u8(self.camera_device_id);
31863            let len = __tmp.len();
31864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31865        } else {
31866            __tmp.len()
31867        }
31868    }
31869}
31870#[doc = "Local position/attitude estimate from a vision source."]
31871#[doc = ""]
31872#[doc = "ID: 102"]
31873#[derive(Debug, Clone, PartialEq)]
31874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31876#[cfg_attr(feature = "ts", derive(TS))]
31877#[cfg_attr(feature = "ts", ts(export))]
31878pub struct VISION_POSITION_ESTIMATE_DATA {
31879    #[doc = "Timestamp (UNIX time or time since system boot)"]
31880    pub usec: u64,
31881    #[doc = "Local X position"]
31882    pub x: f32,
31883    #[doc = "Local Y position"]
31884    pub y: f32,
31885    #[doc = "Local Z position"]
31886    pub z: f32,
31887    #[doc = "Roll angle"]
31888    pub roll: f32,
31889    #[doc = "Pitch angle"]
31890    pub pitch: f32,
31891    #[doc = "Yaw angle"]
31892    pub yaw: f32,
31893    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
31894    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31895    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31896    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31897    pub covariance: [f32; 21],
31898    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
31899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31900    pub reset_counter: u8,
31901}
31902impl VISION_POSITION_ESTIMATE_DATA {
31903    pub const ENCODED_LEN: usize = 117usize;
31904    pub const DEFAULT: Self = Self {
31905        usec: 0_u64,
31906        x: 0.0_f32,
31907        y: 0.0_f32,
31908        z: 0.0_f32,
31909        roll: 0.0_f32,
31910        pitch: 0.0_f32,
31911        yaw: 0.0_f32,
31912        covariance: [0.0_f32; 21usize],
31913        reset_counter: 0_u8,
31914    };
31915    #[cfg(feature = "arbitrary")]
31916    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31917        use arbitrary::{Arbitrary, Unstructured};
31918        let mut buf = [0u8; 1024];
31919        rng.fill_bytes(&mut buf);
31920        let mut unstructured = Unstructured::new(&buf);
31921        Self::arbitrary(&mut unstructured).unwrap_or_default()
31922    }
31923}
31924impl Default for VISION_POSITION_ESTIMATE_DATA {
31925    fn default() -> Self {
31926        Self::DEFAULT.clone()
31927    }
31928}
31929impl MessageData for VISION_POSITION_ESTIMATE_DATA {
31930    type Message = MavMessage;
31931    const ID: u32 = 102u32;
31932    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
31933    const EXTRA_CRC: u8 = 158u8;
31934    const ENCODED_LEN: usize = 117usize;
31935    fn deser(
31936        _version: MavlinkVersion,
31937        __input: &[u8],
31938    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31939        let avail_len = __input.len();
31940        let mut payload_buf = [0; Self::ENCODED_LEN];
31941        let mut buf = if avail_len < Self::ENCODED_LEN {
31942            payload_buf[0..avail_len].copy_from_slice(__input);
31943            Bytes::new(&payload_buf)
31944        } else {
31945            Bytes::new(__input)
31946        };
31947        let mut __struct = Self::default();
31948        __struct.usec = buf.get_u64_le();
31949        __struct.x = buf.get_f32_le();
31950        __struct.y = buf.get_f32_le();
31951        __struct.z = buf.get_f32_le();
31952        __struct.roll = buf.get_f32_le();
31953        __struct.pitch = buf.get_f32_le();
31954        __struct.yaw = buf.get_f32_le();
31955        for v in &mut __struct.covariance {
31956            let val = buf.get_f32_le();
31957            *v = val;
31958        }
31959        __struct.reset_counter = buf.get_u8();
31960        Ok(__struct)
31961    }
31962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31963        let mut __tmp = BytesMut::new(bytes);
31964        #[allow(clippy::absurd_extreme_comparisons)]
31965        #[allow(unused_comparisons)]
31966        if __tmp.remaining() < Self::ENCODED_LEN {
31967            panic!(
31968                "buffer is too small (need {} bytes, but got {})",
31969                Self::ENCODED_LEN,
31970                __tmp.remaining(),
31971            )
31972        }
31973        __tmp.put_u64_le(self.usec);
31974        __tmp.put_f32_le(self.x);
31975        __tmp.put_f32_le(self.y);
31976        __tmp.put_f32_le(self.z);
31977        __tmp.put_f32_le(self.roll);
31978        __tmp.put_f32_le(self.pitch);
31979        __tmp.put_f32_le(self.yaw);
31980        if matches!(version, MavlinkVersion::V2) {
31981            for val in &self.covariance {
31982                __tmp.put_f32_le(*val);
31983            }
31984            __tmp.put_u8(self.reset_counter);
31985            let len = __tmp.len();
31986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31987        } else {
31988            __tmp.len()
31989        }
31990    }
31991}
31992#[doc = "Speed estimate from a vision source."]
31993#[doc = ""]
31994#[doc = "ID: 103"]
31995#[derive(Debug, Clone, PartialEq)]
31996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31998#[cfg_attr(feature = "ts", derive(TS))]
31999#[cfg_attr(feature = "ts", ts(export))]
32000pub struct VISION_SPEED_ESTIMATE_DATA {
32001    #[doc = "Timestamp (UNIX time or time since system boot)"]
32002    pub usec: u64,
32003    #[doc = "Global X speed"]
32004    pub x: f32,
32005    #[doc = "Global Y speed"]
32006    pub y: f32,
32007    #[doc = "Global Z speed"]
32008    pub z: f32,
32009    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
32010    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32011    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32012    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32013    pub covariance: [f32; 9],
32014    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
32015    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32016    pub reset_counter: u8,
32017}
32018impl VISION_SPEED_ESTIMATE_DATA {
32019    pub const ENCODED_LEN: usize = 57usize;
32020    pub const DEFAULT: Self = Self {
32021        usec: 0_u64,
32022        x: 0.0_f32,
32023        y: 0.0_f32,
32024        z: 0.0_f32,
32025        covariance: [0.0_f32; 9usize],
32026        reset_counter: 0_u8,
32027    };
32028    #[cfg(feature = "arbitrary")]
32029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32030        use arbitrary::{Arbitrary, Unstructured};
32031        let mut buf = [0u8; 1024];
32032        rng.fill_bytes(&mut buf);
32033        let mut unstructured = Unstructured::new(&buf);
32034        Self::arbitrary(&mut unstructured).unwrap_or_default()
32035    }
32036}
32037impl Default for VISION_SPEED_ESTIMATE_DATA {
32038    fn default() -> Self {
32039        Self::DEFAULT.clone()
32040    }
32041}
32042impl MessageData for VISION_SPEED_ESTIMATE_DATA {
32043    type Message = MavMessage;
32044    const ID: u32 = 103u32;
32045    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
32046    const EXTRA_CRC: u8 = 208u8;
32047    const ENCODED_LEN: usize = 57usize;
32048    fn deser(
32049        _version: MavlinkVersion,
32050        __input: &[u8],
32051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32052        let avail_len = __input.len();
32053        let mut payload_buf = [0; Self::ENCODED_LEN];
32054        let mut buf = if avail_len < Self::ENCODED_LEN {
32055            payload_buf[0..avail_len].copy_from_slice(__input);
32056            Bytes::new(&payload_buf)
32057        } else {
32058            Bytes::new(__input)
32059        };
32060        let mut __struct = Self::default();
32061        __struct.usec = buf.get_u64_le();
32062        __struct.x = buf.get_f32_le();
32063        __struct.y = buf.get_f32_le();
32064        __struct.z = buf.get_f32_le();
32065        for v in &mut __struct.covariance {
32066            let val = buf.get_f32_le();
32067            *v = val;
32068        }
32069        __struct.reset_counter = buf.get_u8();
32070        Ok(__struct)
32071    }
32072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32073        let mut __tmp = BytesMut::new(bytes);
32074        #[allow(clippy::absurd_extreme_comparisons)]
32075        #[allow(unused_comparisons)]
32076        if __tmp.remaining() < Self::ENCODED_LEN {
32077            panic!(
32078                "buffer is too small (need {} bytes, but got {})",
32079                Self::ENCODED_LEN,
32080                __tmp.remaining(),
32081            )
32082        }
32083        __tmp.put_u64_le(self.usec);
32084        __tmp.put_f32_le(self.x);
32085        __tmp.put_f32_le(self.y);
32086        __tmp.put_f32_le(self.z);
32087        if matches!(version, MavlinkVersion::V2) {
32088            for val in &self.covariance {
32089                __tmp.put_f32_le(*val);
32090            }
32091            __tmp.put_u8(self.reset_counter);
32092            let len = __tmp.len();
32093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32094        } else {
32095            __tmp.len()
32096        }
32097    }
32098}
32099#[doc = "Cumulative distance traveled for each reported wheel."]
32100#[doc = ""]
32101#[doc = "ID: 9000"]
32102#[derive(Debug, Clone, PartialEq)]
32103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32105#[cfg_attr(feature = "ts", derive(TS))]
32106#[cfg_attr(feature = "ts", ts(export))]
32107pub struct WHEEL_DISTANCE_DATA {
32108    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32109    pub time_usec: u64,
32110    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
32111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32112    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32113    pub distance: [f64; 16],
32114    #[doc = "Number of wheels reported."]
32115    pub count: u8,
32116}
32117impl WHEEL_DISTANCE_DATA {
32118    pub const ENCODED_LEN: usize = 137usize;
32119    pub const DEFAULT: Self = Self {
32120        time_usec: 0_u64,
32121        distance: [0.0_f64; 16usize],
32122        count: 0_u8,
32123    };
32124    #[cfg(feature = "arbitrary")]
32125    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32126        use arbitrary::{Arbitrary, Unstructured};
32127        let mut buf = [0u8; 1024];
32128        rng.fill_bytes(&mut buf);
32129        let mut unstructured = Unstructured::new(&buf);
32130        Self::arbitrary(&mut unstructured).unwrap_or_default()
32131    }
32132}
32133impl Default for WHEEL_DISTANCE_DATA {
32134    fn default() -> Self {
32135        Self::DEFAULT.clone()
32136    }
32137}
32138impl MessageData for WHEEL_DISTANCE_DATA {
32139    type Message = MavMessage;
32140    const ID: u32 = 9000u32;
32141    const NAME: &'static str = "WHEEL_DISTANCE";
32142    const EXTRA_CRC: u8 = 113u8;
32143    const ENCODED_LEN: usize = 137usize;
32144    fn deser(
32145        _version: MavlinkVersion,
32146        __input: &[u8],
32147    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32148        let avail_len = __input.len();
32149        let mut payload_buf = [0; Self::ENCODED_LEN];
32150        let mut buf = if avail_len < Self::ENCODED_LEN {
32151            payload_buf[0..avail_len].copy_from_slice(__input);
32152            Bytes::new(&payload_buf)
32153        } else {
32154            Bytes::new(__input)
32155        };
32156        let mut __struct = Self::default();
32157        __struct.time_usec = buf.get_u64_le();
32158        for v in &mut __struct.distance {
32159            let val = buf.get_f64_le();
32160            *v = val;
32161        }
32162        __struct.count = buf.get_u8();
32163        Ok(__struct)
32164    }
32165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32166        let mut __tmp = BytesMut::new(bytes);
32167        #[allow(clippy::absurd_extreme_comparisons)]
32168        #[allow(unused_comparisons)]
32169        if __tmp.remaining() < Self::ENCODED_LEN {
32170            panic!(
32171                "buffer is too small (need {} bytes, but got {})",
32172                Self::ENCODED_LEN,
32173                __tmp.remaining(),
32174            )
32175        }
32176        __tmp.put_u64_le(self.time_usec);
32177        for val in &self.distance {
32178            __tmp.put_f64_le(*val);
32179        }
32180        __tmp.put_u8(self.count);
32181        if matches!(version, MavlinkVersion::V2) {
32182            let len = __tmp.len();
32183            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32184        } else {
32185            __tmp.len()
32186        }
32187    }
32188}
32189#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32190#[doc = ""]
32191#[doc = "ID: 299"]
32192#[derive(Debug, Clone, PartialEq)]
32193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32194#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32195#[cfg_attr(feature = "ts", derive(TS))]
32196#[cfg_attr(feature = "ts", ts(export))]
32197pub struct WIFI_CONFIG_AP_DATA {
32198    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
32199    #[cfg_attr(feature = "ts", ts(type = "string"))]
32200    pub ssid: CharArray<32>,
32201    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
32202    #[cfg_attr(feature = "ts", ts(type = "string"))]
32203    pub password: CharArray<64>,
32204    #[doc = "WiFi Mode."]
32205    #[cfg_attr(feature = "serde", serde(default))]
32206    pub mode: WifiConfigApMode,
32207    #[doc = "Message acceptance response (sent back to GS)."]
32208    #[cfg_attr(feature = "serde", serde(default))]
32209    pub response: WifiConfigApResponse,
32210}
32211impl WIFI_CONFIG_AP_DATA {
32212    pub const ENCODED_LEN: usize = 98usize;
32213    pub const DEFAULT: Self = Self {
32214        ssid: CharArray::new([0_u8; 32usize]),
32215        password: CharArray::new([0_u8; 64usize]),
32216        mode: WifiConfigApMode::DEFAULT,
32217        response: WifiConfigApResponse::DEFAULT,
32218    };
32219    #[cfg(feature = "arbitrary")]
32220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32221        use arbitrary::{Arbitrary, Unstructured};
32222        let mut buf = [0u8; 1024];
32223        rng.fill_bytes(&mut buf);
32224        let mut unstructured = Unstructured::new(&buf);
32225        Self::arbitrary(&mut unstructured).unwrap_or_default()
32226    }
32227}
32228impl Default for WIFI_CONFIG_AP_DATA {
32229    fn default() -> Self {
32230        Self::DEFAULT.clone()
32231    }
32232}
32233impl MessageData for WIFI_CONFIG_AP_DATA {
32234    type Message = MavMessage;
32235    const ID: u32 = 299u32;
32236    const NAME: &'static str = "WIFI_CONFIG_AP";
32237    const EXTRA_CRC: u8 = 19u8;
32238    const ENCODED_LEN: usize = 98usize;
32239    fn deser(
32240        _version: MavlinkVersion,
32241        __input: &[u8],
32242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32243        let avail_len = __input.len();
32244        let mut payload_buf = [0; Self::ENCODED_LEN];
32245        let mut buf = if avail_len < Self::ENCODED_LEN {
32246            payload_buf[0..avail_len].copy_from_slice(__input);
32247            Bytes::new(&payload_buf)
32248        } else {
32249            Bytes::new(__input)
32250        };
32251        let mut __struct = Self::default();
32252        let mut tmp = [0_u8; 32usize];
32253        for v in &mut tmp {
32254            *v = buf.get_u8();
32255        }
32256        __struct.ssid = CharArray::new(tmp);
32257        let mut tmp = [0_u8; 64usize];
32258        for v in &mut tmp {
32259            *v = buf.get_u8();
32260        }
32261        __struct.password = CharArray::new(tmp);
32262        let tmp = buf.get_i8();
32263        __struct.mode =
32264            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32265                enum_type: "WifiConfigApMode",
32266                value: tmp as u64,
32267            })?;
32268        let tmp = buf.get_i8();
32269        __struct.response =
32270            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32271                enum_type: "WifiConfigApResponse",
32272                value: tmp as u64,
32273            })?;
32274        Ok(__struct)
32275    }
32276    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32277        let mut __tmp = BytesMut::new(bytes);
32278        #[allow(clippy::absurd_extreme_comparisons)]
32279        #[allow(unused_comparisons)]
32280        if __tmp.remaining() < Self::ENCODED_LEN {
32281            panic!(
32282                "buffer is too small (need {} bytes, but got {})",
32283                Self::ENCODED_LEN,
32284                __tmp.remaining(),
32285            )
32286        }
32287        for val in &self.ssid {
32288            __tmp.put_u8(*val);
32289        }
32290        for val in &self.password {
32291            __tmp.put_u8(*val);
32292        }
32293        if matches!(version, MavlinkVersion::V2) {
32294            __tmp.put_i8(self.mode as i8);
32295            __tmp.put_i8(self.response as i8);
32296            let len = __tmp.len();
32297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32298        } else {
32299            __tmp.len()
32300        }
32301    }
32302}
32303#[doc = "Winch status."]
32304#[doc = ""]
32305#[doc = "ID: 9005"]
32306#[derive(Debug, Clone, PartialEq)]
32307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32309#[cfg_attr(feature = "ts", derive(TS))]
32310#[cfg_attr(feature = "ts", ts(export))]
32311pub struct WINCH_STATUS_DATA {
32312    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
32313    pub time_usec: u64,
32314    #[doc = "Length of line released. NaN if unknown"]
32315    pub line_length: f32,
32316    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
32317    pub speed: f32,
32318    #[doc = "Tension on the line. NaN if unknown"]
32319    pub tension: f32,
32320    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
32321    pub voltage: f32,
32322    #[doc = "Current draw from the winch. NaN if unknown"]
32323    pub current: f32,
32324    #[doc = "Status flags"]
32325    pub status: MavWinchStatusFlag,
32326    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
32327    pub temperature: i16,
32328}
32329impl WINCH_STATUS_DATA {
32330    pub const ENCODED_LEN: usize = 34usize;
32331    pub const DEFAULT: Self = Self {
32332        time_usec: 0_u64,
32333        line_length: 0.0_f32,
32334        speed: 0.0_f32,
32335        tension: 0.0_f32,
32336        voltage: 0.0_f32,
32337        current: 0.0_f32,
32338        status: MavWinchStatusFlag::DEFAULT,
32339        temperature: 0_i16,
32340    };
32341    #[cfg(feature = "arbitrary")]
32342    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32343        use arbitrary::{Arbitrary, Unstructured};
32344        let mut buf = [0u8; 1024];
32345        rng.fill_bytes(&mut buf);
32346        let mut unstructured = Unstructured::new(&buf);
32347        Self::arbitrary(&mut unstructured).unwrap_or_default()
32348    }
32349}
32350impl Default for WINCH_STATUS_DATA {
32351    fn default() -> Self {
32352        Self::DEFAULT.clone()
32353    }
32354}
32355impl MessageData for WINCH_STATUS_DATA {
32356    type Message = MavMessage;
32357    const ID: u32 = 9005u32;
32358    const NAME: &'static str = "WINCH_STATUS";
32359    const EXTRA_CRC: u8 = 117u8;
32360    const ENCODED_LEN: usize = 34usize;
32361    fn deser(
32362        _version: MavlinkVersion,
32363        __input: &[u8],
32364    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32365        let avail_len = __input.len();
32366        let mut payload_buf = [0; Self::ENCODED_LEN];
32367        let mut buf = if avail_len < Self::ENCODED_LEN {
32368            payload_buf[0..avail_len].copy_from_slice(__input);
32369            Bytes::new(&payload_buf)
32370        } else {
32371            Bytes::new(__input)
32372        };
32373        let mut __struct = Self::default();
32374        __struct.time_usec = buf.get_u64_le();
32375        __struct.line_length = buf.get_f32_le();
32376        __struct.speed = buf.get_f32_le();
32377        __struct.tension = buf.get_f32_le();
32378        __struct.voltage = buf.get_f32_le();
32379        __struct.current = buf.get_f32_le();
32380        let tmp = buf.get_u32_le();
32381        __struct.status = MavWinchStatusFlag::from_bits(tmp).ok_or(
32382            ::mavlink_core::error::ParserError::InvalidFlag {
32383                flag_type: "MavWinchStatusFlag",
32384                value: tmp as u64,
32385            },
32386        )?;
32387        __struct.temperature = buf.get_i16_le();
32388        Ok(__struct)
32389    }
32390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32391        let mut __tmp = BytesMut::new(bytes);
32392        #[allow(clippy::absurd_extreme_comparisons)]
32393        #[allow(unused_comparisons)]
32394        if __tmp.remaining() < Self::ENCODED_LEN {
32395            panic!(
32396                "buffer is too small (need {} bytes, but got {})",
32397                Self::ENCODED_LEN,
32398                __tmp.remaining(),
32399            )
32400        }
32401        __tmp.put_u64_le(self.time_usec);
32402        __tmp.put_f32_le(self.line_length);
32403        __tmp.put_f32_le(self.speed);
32404        __tmp.put_f32_le(self.tension);
32405        __tmp.put_f32_le(self.voltage);
32406        __tmp.put_f32_le(self.current);
32407        __tmp.put_u32_le(self.status.bits());
32408        __tmp.put_i16_le(self.temperature);
32409        if matches!(version, MavlinkVersion::V2) {
32410            let len = __tmp.len();
32411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32412        } else {
32413            __tmp.len()
32414        }
32415    }
32416}
32417#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
32418#[doc = ""]
32419#[doc = "ID: 231"]
32420#[derive(Debug, Clone, PartialEq)]
32421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32423#[cfg_attr(feature = "ts", derive(TS))]
32424#[cfg_attr(feature = "ts", ts(export))]
32425pub struct WIND_COV_DATA {
32426    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32427    pub time_usec: u64,
32428    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
32429    pub wind_x: f32,
32430    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
32431    pub wind_y: f32,
32432    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
32433    pub wind_z: f32,
32434    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32435    pub var_horiz: f32,
32436    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
32437    pub var_vert: f32,
32438    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
32439    pub wind_alt: f32,
32440    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
32441    pub horiz_accuracy: f32,
32442    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
32443    pub vert_accuracy: f32,
32444}
32445impl WIND_COV_DATA {
32446    pub const ENCODED_LEN: usize = 40usize;
32447    pub const DEFAULT: Self = Self {
32448        time_usec: 0_u64,
32449        wind_x: 0.0_f32,
32450        wind_y: 0.0_f32,
32451        wind_z: 0.0_f32,
32452        var_horiz: 0.0_f32,
32453        var_vert: 0.0_f32,
32454        wind_alt: 0.0_f32,
32455        horiz_accuracy: 0.0_f32,
32456        vert_accuracy: 0.0_f32,
32457    };
32458    #[cfg(feature = "arbitrary")]
32459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32460        use arbitrary::{Arbitrary, Unstructured};
32461        let mut buf = [0u8; 1024];
32462        rng.fill_bytes(&mut buf);
32463        let mut unstructured = Unstructured::new(&buf);
32464        Self::arbitrary(&mut unstructured).unwrap_or_default()
32465    }
32466}
32467impl Default for WIND_COV_DATA {
32468    fn default() -> Self {
32469        Self::DEFAULT.clone()
32470    }
32471}
32472impl MessageData for WIND_COV_DATA {
32473    type Message = MavMessage;
32474    const ID: u32 = 231u32;
32475    const NAME: &'static str = "WIND_COV";
32476    const EXTRA_CRC: u8 = 105u8;
32477    const ENCODED_LEN: usize = 40usize;
32478    fn deser(
32479        _version: MavlinkVersion,
32480        __input: &[u8],
32481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32482        let avail_len = __input.len();
32483        let mut payload_buf = [0; Self::ENCODED_LEN];
32484        let mut buf = if avail_len < Self::ENCODED_LEN {
32485            payload_buf[0..avail_len].copy_from_slice(__input);
32486            Bytes::new(&payload_buf)
32487        } else {
32488            Bytes::new(__input)
32489        };
32490        let mut __struct = Self::default();
32491        __struct.time_usec = buf.get_u64_le();
32492        __struct.wind_x = buf.get_f32_le();
32493        __struct.wind_y = buf.get_f32_le();
32494        __struct.wind_z = buf.get_f32_le();
32495        __struct.var_horiz = buf.get_f32_le();
32496        __struct.var_vert = buf.get_f32_le();
32497        __struct.wind_alt = buf.get_f32_le();
32498        __struct.horiz_accuracy = buf.get_f32_le();
32499        __struct.vert_accuracy = buf.get_f32_le();
32500        Ok(__struct)
32501    }
32502    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32503        let mut __tmp = BytesMut::new(bytes);
32504        #[allow(clippy::absurd_extreme_comparisons)]
32505        #[allow(unused_comparisons)]
32506        if __tmp.remaining() < Self::ENCODED_LEN {
32507            panic!(
32508                "buffer is too small (need {} bytes, but got {})",
32509                Self::ENCODED_LEN,
32510                __tmp.remaining(),
32511            )
32512        }
32513        __tmp.put_u64_le(self.time_usec);
32514        __tmp.put_f32_le(self.wind_x);
32515        __tmp.put_f32_le(self.wind_y);
32516        __tmp.put_f32_le(self.wind_z);
32517        __tmp.put_f32_le(self.var_horiz);
32518        __tmp.put_f32_le(self.var_vert);
32519        __tmp.put_f32_le(self.wind_alt);
32520        __tmp.put_f32_le(self.horiz_accuracy);
32521        __tmp.put_f32_le(self.vert_accuracy);
32522        if matches!(version, MavlinkVersion::V2) {
32523            let len = __tmp.len();
32524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32525        } else {
32526            __tmp.len()
32527        }
32528    }
32529}
32530#[derive(Clone, PartialEq, Debug)]
32531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32532#[cfg_attr(feature = "serde", serde(tag = "type"))]
32533#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32534#[cfg_attr(feature = "ts", derive(TS))]
32535#[cfg_attr(feature = "ts", ts(export))]
32536#[repr(u32)]
32537pub enum MavMessage {
32538    #[doc = "Set the vehicle attitude and body angular rates."]
32539    #[doc = ""]
32540    #[doc = "ID: 140"]
32541    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
32542    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
32543    #[doc = ""]
32544    #[doc = "ID: 375"]
32545    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
32546    #[doc = "The location and information of an ADSB vehicle."]
32547    #[doc = ""]
32548    #[doc = "ID: 246"]
32549    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
32550    #[doc = "The location and information of an AIS vessel."]
32551    #[doc = ""]
32552    #[doc = "ID: 301"]
32553    AIS_VESSEL(AIS_VESSEL_DATA),
32554    #[doc = "The current system altitude."]
32555    #[doc = ""]
32556    #[doc = "ID: 141"]
32557    ALTITUDE(ALTITUDE_DATA),
32558    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
32559    #[doc = ""]
32560    #[doc = "ID: 30"]
32561    ATTITUDE(ATTITUDE_DATA),
32562    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32563    #[doc = ""]
32564    #[doc = "ID: 31"]
32565    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
32566    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
32567    #[doc = ""]
32568    #[doc = "ID: 61"]
32569    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
32570    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
32571    #[doc = ""]
32572    #[doc = "ID: 83"]
32573    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
32574    #[doc = "Motion capture attitude and position."]
32575    #[doc = ""]
32576    #[doc = "ID: 138"]
32577    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
32578    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
32579    #[doc = ""]
32580    #[doc = "ID: 7"]
32581    AUTH_KEY(AUTH_KEY_DATA),
32582    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
32583    #[doc = ""]
32584    #[doc = "ID: 286"]
32585    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
32586    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
32587    #[doc = ""]
32588    #[doc = "ID: 148"]
32589    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
32590    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
32591    #[doc = ""]
32592    #[doc = "ID: 435"]
32593    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
32594    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
32595    #[doc = ""]
32596    #[doc = "ID: 437"]
32597    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
32598    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
32599    #[doc = ""]
32600    #[doc = "ID: 372"]
32601    BATTERY_INFO(BATTERY_INFO_DATA),
32602    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
32603    #[doc = ""]
32604    #[doc = "ID: 147"]
32605    BATTERY_STATUS(BATTERY_STATUS_DATA),
32606    #[doc = "Report button state change."]
32607    #[doc = ""]
32608    #[doc = "ID: 257"]
32609    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
32610    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32611    #[doc = ""]
32612    #[doc = "ID: 262"]
32613    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
32614    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32615    #[doc = ""]
32616    #[doc = "ID: 271"]
32617    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
32618    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
32619    #[doc = ""]
32620    #[doc = "ID: 263"]
32621    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
32622    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32623    #[doc = ""]
32624    #[doc = "ID: 259"]
32625    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
32626    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
32627    #[doc = ""]
32628    #[doc = "ID: 260"]
32629    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
32630    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
32631    #[doc = ""]
32632    #[doc = "ID: 277"]
32633    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
32634    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32635    #[doc = ""]
32636    #[doc = "ID: 276"]
32637    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
32638    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
32639    #[doc = ""]
32640    #[doc = "ID: 275"]
32641    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
32642    #[doc = "Camera-IMU triggering and synchronisation message."]
32643    #[doc = ""]
32644    #[doc = "ID: 112"]
32645    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
32646    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
32647    #[doc = ""]
32648    #[doc = "ID: 387"]
32649    CANFD_FRAME(CANFD_FRAME_DATA),
32650    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
32651    #[doc = ""]
32652    #[doc = "ID: 388"]
32653    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
32654    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
32655    #[doc = ""]
32656    #[doc = "ID: 386"]
32657    CAN_FRAME(CAN_FRAME_DATA),
32658    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
32659    #[doc = ""]
32660    #[doc = "ID: 336"]
32661    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
32662    #[doc = "Report current used cellular network status."]
32663    #[doc = ""]
32664    #[doc = "ID: 334"]
32665    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
32666    #[doc = "Request to control this MAV."]
32667    #[doc = ""]
32668    #[doc = "ID: 5"]
32669    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
32670    #[doc = "Accept / deny control of this MAV."]
32671    #[doc = ""]
32672    #[doc = "ID: 6"]
32673    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
32674    #[doc = "Information about a potential collision."]
32675    #[doc = ""]
32676    #[doc = "ID: 247"]
32677    COLLISION(COLLISION_DATA),
32678    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32679    #[doc = ""]
32680    #[doc = "ID: 77"]
32681    COMMAND_ACK(COMMAND_ACK_DATA),
32682    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32683    #[doc = ""]
32684    #[doc = "ID: 80"]
32685    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
32686    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32687    #[doc = ""]
32688    #[doc = "ID: 75"]
32689    COMMAND_INT(COMMAND_INT_DATA),
32690    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
32691    #[doc = ""]
32692    #[doc = "ID: 76"]
32693    COMMAND_LONG(COMMAND_LONG_DATA),
32694    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
32695    #[doc = ""]
32696    #[doc = "ID: 395"]
32697    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
32698    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
32699    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
32700    #[doc = ""]
32701    #[doc = "ID: 396"]
32702    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
32703    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
32704    #[doc = ""]
32705    #[doc = "ID: 397"]
32706    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
32707    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
32708    #[doc = ""]
32709    #[doc = "ID: 146"]
32710    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
32711    #[doc = "offset response to encapsulated data."]
32712    #[doc = ""]
32713    #[doc = "ID: 50005"]
32714    CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
32715    #[doc = "Start firmware update with encapsulated data."]
32716    #[doc = ""]
32717    #[doc = "ID: 50004"]
32718    CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
32719    #[doc = "Raw RC Data."]
32720    #[doc = ""]
32721    #[doc = "ID: 50001"]
32722    CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
32723    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
32724    #[doc = ""]
32725    #[doc = "ID: 411"]
32726    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
32727    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
32728    #[doc = ""]
32729    #[doc = "ID: 436"]
32730    CURRENT_MODE(CURRENT_MODE_DATA),
32731    #[doc = "Data stream status information."]
32732    #[doc = ""]
32733    #[doc = "ID: 67"]
32734    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
32735    DATA_STREAM(DATA_STREAM_DATA),
32736    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32737    #[doc = ""]
32738    #[doc = "ID: 130"]
32739    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
32740    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
32741    #[doc = ""]
32742    #[doc = "ID: 254"]
32743    DEBUG(DEBUG_DATA),
32744    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
32745    #[doc = ""]
32746    #[doc = "ID: 350"]
32747    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
32748    #[doc = "To debug something using a named 3D vector."]
32749    #[doc = ""]
32750    #[doc = "ID: 250"]
32751    DEBUG_VECT(DEBUG_VECT_DATA),
32752    #[doc = "Distance sensor information for an onboard rangefinder."]
32753    #[doc = ""]
32754    #[doc = "ID: 132"]
32755    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
32756    #[doc = "EFI status output."]
32757    #[doc = ""]
32758    #[doc = "ID: 225"]
32759    EFI_STATUS(EFI_STATUS_DATA),
32760    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
32761    #[doc = ""]
32762    #[doc = "ID: 131"]
32763    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
32764    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
32765    #[doc = ""]
32766    #[doc = "ID: 290"]
32767    ESC_INFO(ESC_INFO_DATA),
32768    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
32769    #[doc = ""]
32770    #[doc = "ID: 291"]
32771    ESC_STATUS(ESC_STATUS_DATA),
32772    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
32773    #[doc = ""]
32774    #[doc = "ID: 230"]
32775    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
32776    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
32777    #[doc = ""]
32778    #[doc = "ID: 410"]
32779    EVENT(EVENT_DATA),
32780    #[doc = "Provides state for additional features."]
32781    #[doc = ""]
32782    #[doc = "ID: 245"]
32783    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
32784    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
32785    #[doc = ""]
32786    #[doc = "ID: 162"]
32787    FENCE_STATUS(FENCE_STATUS_DATA),
32788    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
32789    #[doc = ""]
32790    #[doc = "ID: 110"]
32791    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
32792    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
32793    #[doc = ""]
32794    #[doc = "ID: 264"]
32795    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
32796    #[doc = "Current motion information from a designated system."]
32797    #[doc = ""]
32798    #[doc = "ID: 144"]
32799    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
32800    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
32801    #[doc = ""]
32802    #[doc = "ID: 371"]
32803    FUEL_STATUS(FUEL_STATUS_DATA),
32804    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
32805    #[doc = ""]
32806    #[doc = "ID: 373"]
32807    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
32808    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
32809    #[doc = ""]
32810    #[doc = "ID: 285"]
32811    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
32812    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
32813    #[doc = ""]
32814    #[doc = "ID: 283"]
32815    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
32816    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
32817    #[doc = ""]
32818    #[doc = "ID: 284"]
32819    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
32820    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
32821    #[doc = ""]
32822    #[doc = "ID: 280"]
32823    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
32824    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32825    #[doc = ""]
32826    #[doc = "ID: 282"]
32827    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
32828    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
32829    #[doc = ""]
32830    #[doc = "ID: 288"]
32831    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
32832    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
32833    #[doc = ""]
32834    #[doc = "ID: 287"]
32835    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
32836    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
32837    #[doc = ""]
32838    #[doc = "ID: 281"]
32839    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
32840    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
32841    #[doc = ""]
32842    #[doc = "ID: 33"]
32843    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
32844    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
32845    #[doc = ""]
32846    #[doc = "ID: 63"]
32847    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
32848    #[doc = "Global position/attitude estimate from a vision source."]
32849    #[doc = ""]
32850    #[doc = "ID: 101"]
32851    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
32852    #[doc = "Second GPS data."]
32853    #[doc = ""]
32854    #[doc = "ID: 124"]
32855    GPS2_RAW(GPS2_RAW_DATA),
32856    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32857    #[doc = ""]
32858    #[doc = "ID: 128"]
32859    GPS2_RTK(GPS2_RTK_DATA),
32860    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
32861    #[doc = ""]
32862    #[doc = "ID: 49"]
32863    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
32864    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
32865    #[doc = ""]
32866    #[doc = "ID: 123"]
32867    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
32868    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
32869    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
32870    #[doc = ""]
32871    #[doc = "ID: 232"]
32872    GPS_INPUT(GPS_INPUT_DATA),
32873    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32874    #[doc = ""]
32875    #[doc = "ID: 24"]
32876    GPS_RAW_INT(GPS_RAW_INT_DATA),
32877    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
32878    #[doc = ""]
32879    #[doc = "ID: 233"]
32880    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
32881    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
32882    #[doc = ""]
32883    #[doc = "ID: 127"]
32884    GPS_RTK(GPS_RTK_DATA),
32885    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
32886    #[doc = ""]
32887    #[doc = "ID: 25"]
32888    GPS_STATUS(GPS_STATUS_DATA),
32889    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
32890    #[doc = ""]
32891    #[doc = "ID: 0"]
32892    HEARTBEAT(HEARTBEAT_DATA),
32893    #[doc = "Herelink Telemetry."]
32894    #[doc = ""]
32895    #[doc = "ID: 50003"]
32896    HERELINK_TELEM(HERELINK_TELEM_DATA),
32897    #[doc = "Information about video stream."]
32898    #[doc = ""]
32899    #[doc = "ID: 50002"]
32900    HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
32901    #[doc = "The IMU readings in SI units in NED body frame."]
32902    #[doc = ""]
32903    #[doc = "ID: 105"]
32904    HIGHRES_IMU(HIGHRES_IMU_DATA),
32905    #[doc = "Message appropriate for high latency connections like Iridium."]
32906    #[doc = ""]
32907    #[doc = "ID: 234"]
32908    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
32909    HIGH_LATENCY(HIGH_LATENCY_DATA),
32910    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
32911    #[doc = ""]
32912    #[doc = "ID: 235"]
32913    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
32914    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
32915    #[doc = ""]
32916    #[doc = "ID: 93"]
32917    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
32918    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
32919    #[doc = ""]
32920    #[doc = "ID: 91"]
32921    HIL_CONTROLS(HIL_CONTROLS_DATA),
32922    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
32923    #[doc = ""]
32924    #[doc = "ID: 113"]
32925    HIL_GPS(HIL_GPS_DATA),
32926    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
32927    #[doc = ""]
32928    #[doc = "ID: 114"]
32929    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
32930    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
32931    #[doc = ""]
32932    #[doc = "ID: 92"]
32933    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
32934    #[doc = "The IMU readings in SI units in NED body frame."]
32935    #[doc = ""]
32936    #[doc = "ID: 107"]
32937    HIL_SENSOR(HIL_SENSOR_DATA),
32938    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32939    #[doc = ""]
32940    #[doc = "ID: 90"]
32941    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
32942    HIL_STATE(HIL_STATE_DATA),
32943    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
32944    #[doc = ""]
32945    #[doc = "ID: 115"]
32946    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
32947    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
32948    #[doc = ""]
32949    #[doc = "ID: 242"]
32950    HOME_POSITION(HOME_POSITION_DATA),
32951    #[doc = "Temperature and humidity from hygrometer."]
32952    #[doc = ""]
32953    #[doc = "ID: 12920"]
32954    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
32955    #[doc = "Illuminator status."]
32956    #[doc = ""]
32957    #[doc = "ID: 440"]
32958    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
32959    #[doc = "Status of the Iridium SBD link."]
32960    #[doc = ""]
32961    #[doc = "ID: 335"]
32962    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
32963    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
32964    #[doc = ""]
32965    #[doc = "ID: 149"]
32966    LANDING_TARGET(LANDING_TARGET_DATA),
32967    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
32968    #[doc = ""]
32969    #[doc = "ID: 8"]
32970    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
32971    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32972    #[doc = ""]
32973    #[doc = "ID: 32"]
32974    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
32975    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32976    #[doc = ""]
32977    #[doc = "ID: 64"]
32978    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
32979    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
32980    #[doc = ""]
32981    #[doc = "ID: 89"]
32982    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
32983    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
32984    #[doc = ""]
32985    #[doc = "ID: 268"]
32986    LOGGING_ACK(LOGGING_ACK_DATA),
32987    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
32988    #[doc = ""]
32989    #[doc = "ID: 266"]
32990    LOGGING_DATA(LOGGING_DATA_DATA),
32991    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
32992    #[doc = ""]
32993    #[doc = "ID: 267"]
32994    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
32995    #[doc = "Reply to LOG_REQUEST_DATA."]
32996    #[doc = ""]
32997    #[doc = "ID: 120"]
32998    LOG_DATA(LOG_DATA_DATA),
32999    #[doc = "Reply to LOG_REQUEST_LIST."]
33000    #[doc = ""]
33001    #[doc = "ID: 118"]
33002    LOG_ENTRY(LOG_ENTRY_DATA),
33003    #[doc = "Erase all logs."]
33004    #[doc = ""]
33005    #[doc = "ID: 121"]
33006    LOG_ERASE(LOG_ERASE_DATA),
33007    #[doc = "Request a chunk of a log."]
33008    #[doc = ""]
33009    #[doc = "ID: 119"]
33010    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
33011    #[doc = "Stop log transfer and resume normal logging."]
33012    #[doc = ""]
33013    #[doc = "ID: 122"]
33014    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
33015    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
33016    #[doc = ""]
33017    #[doc = "ID: 117"]
33018    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
33019    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
33020    #[doc = ""]
33021    #[doc = "ID: 192"]
33022    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
33023    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
33024    #[doc = ""]
33025    #[doc = "ID: 69"]
33026    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
33027    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
33028    #[doc = ""]
33029    #[doc = "ID: 81"]
33030    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
33031    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33032    #[doc = ""]
33033    #[doc = "ID: 249"]
33034    MEMORY_VECT(MEMORY_VECT_DATA),
33035    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
33036    #[doc = ""]
33037    #[doc = "ID: 244"]
33038    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
33039    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
33040    #[doc = ""]
33041    #[doc = "ID: 47"]
33042    MISSION_ACK(MISSION_ACK_DATA),
33043    #[doc = "Delete all mission items at once."]
33044    #[doc = ""]
33045    #[doc = "ID: 45"]
33046    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
33047    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
33048    #[doc = ""]
33049    #[doc = "ID: 44"]
33050    MISSION_COUNT(MISSION_COUNT_DATA),
33051    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
33052    #[doc = ""]
33053    #[doc = "ID: 42"]
33054    MISSION_CURRENT(MISSION_CURRENT_DATA),
33055    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33056    #[doc = ""]
33057    #[doc = "ID: 39"]
33058    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
33059    MISSION_ITEM(MISSION_ITEM_DATA),
33060    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
33061    #[doc = ""]
33062    #[doc = "ID: 73"]
33063    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
33064    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
33065    #[doc = ""]
33066    #[doc = "ID: 46"]
33067    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
33068    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
33069    #[doc = ""]
33070    #[doc = "ID: 40"]
33071    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
33072    MISSION_REQUEST(MISSION_REQUEST_DATA),
33073    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
33074    #[doc = ""]
33075    #[doc = "ID: 51"]
33076    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
33077    #[doc = "Request the overall list of mission items from the system/component."]
33078    #[doc = ""]
33079    #[doc = "ID: 43"]
33080    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
33081    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
33082    #[doc = ""]
33083    #[doc = "ID: 37"]
33084    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
33085    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
33086    #[doc = ""]
33087    #[doc = "ID: 41"]
33088    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
33089    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
33090    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
33091    #[doc = ""]
33092    #[doc = "ID: 38"]
33093    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
33094    #[doc = "Orientation of a mount."]
33095    #[doc = ""]
33096    #[doc = "ID: 265"]
33097    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
33098    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
33099    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33100    #[doc = ""]
33101    #[doc = "ID: 251"]
33102    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
33103    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
33104    #[doc = ""]
33105    #[doc = "ID: 252"]
33106    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
33107    #[doc = "The state of the navigation and position controller."]
33108    #[doc = ""]
33109    #[doc = "ID: 62"]
33110    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
33111    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
33112    #[doc = ""]
33113    #[doc = "ID: 330"]
33114    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
33115    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
33116    #[doc = ""]
33117    #[doc = "ID: 331"]
33118    ODOMETRY(ODOMETRY_DATA),
33119    #[doc = "Hardware status sent by an onboard computer."]
33120    #[doc = ""]
33121    #[doc = "ID: 390"]
33122    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
33123    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
33124    #[doc = ""]
33125    #[doc = "ID: 12918"]
33126    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
33127    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
33128    #[doc = ""]
33129    #[doc = "ID: 12902"]
33130    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
33131    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
33132    #[doc = ""]
33133    #[doc = "ID: 12900"]
33134    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
33135    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
33136    #[doc = ""]
33137    #[doc = "ID: 12901"]
33138    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
33139    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
33140    #[doc = ""]
33141    #[doc = "ID: 12915"]
33142    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
33143    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
33144    #[doc = ""]
33145    #[doc = "ID: 12905"]
33146    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
33147    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
33148    #[doc = ""]
33149    #[doc = "ID: 12903"]
33150    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
33151    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
33152    #[doc = ""]
33153    #[doc = "ID: 12904"]
33154    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
33155    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
33156    #[doc = ""]
33157    #[doc = "ID: 12919"]
33158    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
33159    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
33160    #[doc = ""]
33161    #[doc = "ID: 100"]
33162    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
33163    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
33164    #[doc = ""]
33165    #[doc = "ID: 106"]
33166    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
33167    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
33168    #[doc = ""]
33169    #[doc = "ID: 360"]
33170    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
33171    #[doc = "Response from a PARAM_EXT_SET message."]
33172    #[doc = ""]
33173    #[doc = "ID: 324"]
33174    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
33175    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
33176    #[doc = ""]
33177    #[doc = "ID: 321"]
33178    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
33179    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
33180    #[doc = ""]
33181    #[doc = "ID: 320"]
33182    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
33183    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
33184    #[doc = ""]
33185    #[doc = "ID: 323"]
33186    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
33187    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
33188    #[doc = ""]
33189    #[doc = "ID: 322"]
33190    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
33191    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
33192    #[doc = ""]
33193    #[doc = "ID: 50"]
33194    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
33195    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33196    #[doc = ""]
33197    #[doc = "ID: 21"]
33198    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
33199    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
33200    #[doc = ""]
33201    #[doc = "ID: 20"]
33202    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
33203    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33204    #[doc = ""]
33205    #[doc = "ID: 23"]
33206    PARAM_SET(PARAM_SET_DATA),
33207    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
33208    #[doc = ""]
33209    #[doc = "ID: 22"]
33210    PARAM_VALUE(PARAM_VALUE_DATA),
33211    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
33212    #[doc = ""]
33213    #[doc = "ID: 4"]
33214    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
33215    PING(PING_DATA),
33216    #[doc = "Control vehicle tone generation (buzzer)."]
33217    #[doc = ""]
33218    #[doc = "ID: 258"]
33219    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
33220    PLAY_TUNE(PLAY_TUNE_DATA),
33221    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
33222    #[doc = ""]
33223    #[doc = "ID: 400"]
33224    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
33225    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
33226    #[doc = ""]
33227    #[doc = "ID: 87"]
33228    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
33229    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
33230    #[doc = ""]
33231    #[doc = "ID: 85"]
33232    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
33233    #[doc = "Power supply status."]
33234    #[doc = ""]
33235    #[doc = "ID: 125"]
33236    POWER_STATUS(POWER_STATUS_DATA),
33237    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
33238    #[doc = ""]
33239    #[doc = "ID: 300"]
33240    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
33241    #[doc = "Status generated by radio and injected into MAVLink stream."]
33242    #[doc = ""]
33243    #[doc = "ID: 109"]
33244    RADIO_STATUS(RADIO_STATUS_DATA),
33245    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
33246    #[doc = ""]
33247    #[doc = "ID: 27"]
33248    RAW_IMU(RAW_IMU_DATA),
33249    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
33250    #[doc = ""]
33251    #[doc = "ID: 28"]
33252    RAW_PRESSURE(RAW_PRESSURE_DATA),
33253    #[doc = "RPM sensor data message."]
33254    #[doc = ""]
33255    #[doc = "ID: 339"]
33256    RAW_RPM(RAW_RPM_DATA),
33257    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33258    #[doc = ""]
33259    #[doc = "ID: 65"]
33260    RC_CHANNELS(RC_CHANNELS_DATA),
33261    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
33262    #[doc = ""]
33263    #[doc = "ID: 70"]
33264    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
33265    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
33266    #[doc = ""]
33267    #[doc = "ID: 35"]
33268    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
33269    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
33270    #[doc = ""]
33271    #[doc = "ID: 34"]
33272    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
33273    #[doc = "Request a data stream."]
33274    #[doc = ""]
33275    #[doc = "ID: 66"]
33276    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
33277    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
33278    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
33279    #[doc = ""]
33280    #[doc = "ID: 412"]
33281    REQUEST_EVENT(REQUEST_EVENT_DATA),
33282    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
33283    #[doc = ""]
33284    #[doc = "ID: 142"]
33285    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
33286    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
33287    #[doc = ""]
33288    #[doc = "ID: 413"]
33289    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
33290    #[doc = "Read out the safety zone the MAV currently assumes."]
33291    #[doc = ""]
33292    #[doc = "ID: 55"]
33293    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
33294    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
33295    #[doc = ""]
33296    #[doc = "ID: 54"]
33297    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
33298    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
33299    #[doc = ""]
33300    #[doc = "ID: 26"]
33301    SCALED_IMU(SCALED_IMU_DATA),
33302    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
33303    #[doc = ""]
33304    #[doc = "ID: 116"]
33305    SCALED_IMU2(SCALED_IMU2_DATA),
33306    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
33307    #[doc = ""]
33308    #[doc = "ID: 129"]
33309    SCALED_IMU3(SCALED_IMU3_DATA),
33310    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
33311    #[doc = ""]
33312    #[doc = "ID: 29"]
33313    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
33314    #[doc = "Barometer readings for 2nd barometer."]
33315    #[doc = ""]
33316    #[doc = "ID: 137"]
33317    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
33318    #[doc = "Barometer readings for 3rd barometer."]
33319    #[doc = ""]
33320    #[doc = "ID: 143"]
33321    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
33322    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
33323    #[doc = ""]
33324    #[doc = "ID: 126"]
33325    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
33326    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
33327    #[doc = ""]
33328    #[doc = "ID: 36"]
33329    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
33330    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
33331    #[doc = ""]
33332    #[doc = "ID: 256"]
33333    SETUP_SIGNING(SETUP_SIGNING_DATA),
33334    #[doc = "Set the vehicle attitude and body angular rates."]
33335    #[doc = ""]
33336    #[doc = "ID: 139"]
33337    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
33338    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
33339    #[doc = ""]
33340    #[doc = "ID: 82"]
33341    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
33342    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
33343    #[doc = ""]
33344    #[doc = "ID: 48"]
33345    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
33346    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
33347    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
33348    #[doc = ""]
33349    #[doc = "ID: 243"]
33350    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
33351    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
33352    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
33353    #[doc = ""]
33354    #[doc = "ID: 11"]
33355    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
33356    SET_MODE(SET_MODE_DATA),
33357    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
33358    #[doc = ""]
33359    #[doc = "ID: 86"]
33360    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
33361    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
33362    #[doc = ""]
33363    #[doc = "ID: 84"]
33364    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
33365    #[doc = "Status of simulation environment, if used."]
33366    #[doc = ""]
33367    #[doc = "ID: 108"]
33368    SIM_STATE(SIM_STATE_DATA),
33369    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
33370    #[doc = ""]
33371    #[doc = "ID: 370"]
33372    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
33373    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
33374    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
33375    #[doc = ""]
33376    #[doc = "ID: 253"]
33377    STATUSTEXT(STATUSTEXT_DATA),
33378    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
33379    #[doc = ""]
33380    #[doc = "ID: 261"]
33381    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
33382    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
33383    #[doc = ""]
33384    #[doc = "ID: 401"]
33385    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
33386    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
33387    #[doc = ""]
33388    #[doc = "ID: 2"]
33389    SYSTEM_TIME(SYSTEM_TIME_DATA),
33390    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
33391    #[doc = ""]
33392    #[doc = "ID: 1"]
33393    SYS_STATUS(SYS_STATUS_DATA),
33394    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
33395    #[doc = ""]
33396    #[doc = "ID: 135"]
33397    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
33398    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33399    #[doc = ""]
33400    #[doc = "ID: 134"]
33401    TERRAIN_DATA(TERRAIN_DATA_DATA),
33402    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33403    #[doc = ""]
33404    #[doc = "ID: 136"]
33405    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
33406    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
33407    #[doc = ""]
33408    #[doc = "ID: 133"]
33409    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
33410    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
33411    #[doc = ""]
33412    #[doc = "ID: 111"]
33413    TIMESYNC(TIMESYNC_DATA),
33414    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
33415    #[doc = ""]
33416    #[doc = "ID: 380"]
33417    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
33418    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
33419    #[doc = ""]
33420    #[doc = "ID: 333"]
33421    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
33422    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
33423    #[doc = ""]
33424    #[doc = "ID: 332"]
33425    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
33426    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
33427    #[doc = ""]
33428    #[doc = "ID: 385"]
33429    TUNNEL(TUNNEL_DATA),
33430    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
33431    #[doc = ""]
33432    #[doc = "ID: 311"]
33433    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
33434    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
33435    #[doc = ""]
33436    #[doc = "ID: 310"]
33437    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
33438    #[doc = "The global position resulting from GPS and sensor fusion."]
33439    #[doc = ""]
33440    #[doc = "ID: 340"]
33441    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
33442    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
33443    #[doc = ""]
33444    #[doc = "ID: 248"]
33445    V2_EXTENSION(V2_EXTENSION_DATA),
33446    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
33447    #[doc = ""]
33448    #[doc = "ID: 74"]
33449    VFR_HUD(VFR_HUD_DATA),
33450    #[doc = "Vibration levels and accelerometer clipping."]
33451    #[doc = ""]
33452    #[doc = "ID: 241"]
33453    VIBRATION(VIBRATION_DATA),
33454    #[doc = "Global position estimate from a Vicon motion system source."]
33455    #[doc = ""]
33456    #[doc = "ID: 104"]
33457    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
33458    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33459    #[doc = ""]
33460    #[doc = "ID: 269"]
33461    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
33462    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33463    #[doc = ""]
33464    #[doc = "ID: 270"]
33465    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
33466    #[doc = "Local position/attitude estimate from a vision source."]
33467    #[doc = ""]
33468    #[doc = "ID: 102"]
33469    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
33470    #[doc = "Speed estimate from a vision source."]
33471    #[doc = ""]
33472    #[doc = "ID: 103"]
33473    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
33474    #[doc = "Cumulative distance traveled for each reported wheel."]
33475    #[doc = ""]
33476    #[doc = "ID: 9000"]
33477    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
33478    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33479    #[doc = ""]
33480    #[doc = "ID: 299"]
33481    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
33482    #[doc = "Winch status."]
33483    #[doc = ""]
33484    #[doc = "ID: 9005"]
33485    WINCH_STATUS(WINCH_STATUS_DATA),
33486    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33487    #[doc = ""]
33488    #[doc = "ID: 231"]
33489    WIND_COV(WIND_COV_DATA),
33490}
33491impl MavMessage {
33492    pub const fn all_ids() -> &'static [u32] {
33493        &[
33494            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
33495            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
33496            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
33497            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
33498            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
33499            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
33500            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
33501            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
33502            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
33503            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
33504            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
33505            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
33506            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
33507            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
33508            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
33509            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
33510            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
33511            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
33512            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
33513            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
33514            12915u32, 12918u32, 12919u32, 12920u32, 50001u32, 50002u32, 50003u32, 50004u32,
33515            50005u32,
33516        ]
33517    }
33518}
33519impl Message for MavMessage {
33520    fn parse(
33521        version: MavlinkVersion,
33522        id: u32,
33523        payload: &[u8],
33524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33525        match id {
33526            ACTUATOR_CONTROL_TARGET_DATA::ID => {
33527                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
33528                    .map(Self::ACTUATOR_CONTROL_TARGET)
33529            }
33530            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
33531                .map(Self::ACTUATOR_OUTPUT_STATUS),
33532            ADSB_VEHICLE_DATA::ID => {
33533                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
33534            }
33535            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
33536            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
33537            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
33538            ATTITUDE_QUATERNION_DATA::ID => {
33539                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
33540            }
33541            ATTITUDE_QUATERNION_COV_DATA::ID => {
33542                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
33543                    .map(Self::ATTITUDE_QUATERNION_COV)
33544            }
33545            ATTITUDE_TARGET_DATA::ID => {
33546                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
33547            }
33548            ATT_POS_MOCAP_DATA::ID => {
33549                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
33550            }
33551            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
33552            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33553                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
33554                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
33555            }
33556            AUTOPILOT_VERSION_DATA::ID => {
33557                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
33558            }
33559            AVAILABLE_MODES_DATA::ID => {
33560                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
33561            }
33562            AVAILABLE_MODES_MONITOR_DATA::ID => {
33563                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
33564                    .map(Self::AVAILABLE_MODES_MONITOR)
33565            }
33566            BATTERY_INFO_DATA::ID => {
33567                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
33568            }
33569            BATTERY_STATUS_DATA::ID => {
33570                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
33571            }
33572            BUTTON_CHANGE_DATA::ID => {
33573                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
33574            }
33575            CAMERA_CAPTURE_STATUS_DATA::ID => {
33576                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
33577            }
33578            CAMERA_FOV_STATUS_DATA::ID => {
33579                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
33580            }
33581            CAMERA_IMAGE_CAPTURED_DATA::ID => {
33582                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
33583            }
33584            CAMERA_INFORMATION_DATA::ID => {
33585                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
33586            }
33587            CAMERA_SETTINGS_DATA::ID => {
33588                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
33589            }
33590            CAMERA_THERMAL_RANGE_DATA::ID => {
33591                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
33592            }
33593            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
33594                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
33595                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
33596            }
33597            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
33598                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
33599                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
33600            }
33601            CAMERA_TRIGGER_DATA::ID => {
33602                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
33603            }
33604            CANFD_FRAME_DATA::ID => {
33605                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
33606            }
33607            CAN_FILTER_MODIFY_DATA::ID => {
33608                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
33609            }
33610            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
33611            CELLULAR_CONFIG_DATA::ID => {
33612                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
33613            }
33614            CELLULAR_STATUS_DATA::ID => {
33615                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
33616            }
33617            CHANGE_OPERATOR_CONTROL_DATA::ID => {
33618                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
33619                    .map(Self::CHANGE_OPERATOR_CONTROL)
33620            }
33621            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
33622                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
33623                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
33624            }
33625            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
33626            COMMAND_ACK_DATA::ID => {
33627                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
33628            }
33629            COMMAND_CANCEL_DATA::ID => {
33630                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
33631            }
33632            COMMAND_INT_DATA::ID => {
33633                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
33634            }
33635            COMMAND_LONG_DATA::ID => {
33636                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
33637            }
33638            COMPONENT_INFORMATION_DATA::ID => {
33639                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
33640            }
33641            COMPONENT_INFORMATION_BASIC_DATA::ID => {
33642                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
33643                    .map(Self::COMPONENT_INFORMATION_BASIC)
33644            }
33645            COMPONENT_METADATA_DATA::ID => {
33646                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
33647            }
33648            CONTROL_SYSTEM_STATE_DATA::ID => {
33649                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
33650            }
33651            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
33652                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
33653                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
33654            }
33655            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
33656                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
33657                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
33658            }
33659            CUBEPILOT_RAW_RC_DATA::ID => {
33660                CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
33661            }
33662            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
33663                .map(Self::CURRENT_EVENT_SEQUENCE),
33664            CURRENT_MODE_DATA::ID => {
33665                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
33666            }
33667            DATA_STREAM_DATA::ID => {
33668                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
33669            }
33670            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
33671                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
33672                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
33673            }
33674            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
33675            DEBUG_FLOAT_ARRAY_DATA::ID => {
33676                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
33677            }
33678            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
33679            DISTANCE_SENSOR_DATA::ID => {
33680                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
33681            }
33682            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
33683            ENCAPSULATED_DATA_DATA::ID => {
33684                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
33685            }
33686            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
33687            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
33688            ESTIMATOR_STATUS_DATA::ID => {
33689                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
33690            }
33691            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
33692            EXTENDED_SYS_STATE_DATA::ID => {
33693                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
33694            }
33695            FENCE_STATUS_DATA::ID => {
33696                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
33697            }
33698            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
33699                .map(Self::FILE_TRANSFER_PROTOCOL),
33700            FLIGHT_INFORMATION_DATA::ID => {
33701                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
33702            }
33703            FOLLOW_TARGET_DATA::ID => {
33704                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
33705            }
33706            FUEL_STATUS_DATA::ID => {
33707                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
33708            }
33709            GENERATOR_STATUS_DATA::ID => {
33710                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
33711            }
33712            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
33713                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
33714                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
33715            }
33716            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
33717                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
33718                    .map(Self::GIMBAL_DEVICE_INFORMATION)
33719            }
33720            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
33721                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
33722                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
33723            }
33724            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
33725                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
33726                    .map(Self::GIMBAL_MANAGER_INFORMATION)
33727            }
33728            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
33729                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
33730                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
33731            }
33732            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33733                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
33734                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
33735            }
33736            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
33737                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
33738                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
33739            }
33740            GIMBAL_MANAGER_STATUS_DATA::ID => {
33741                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
33742            }
33743            GLOBAL_POSITION_INT_DATA::ID => {
33744                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
33745            }
33746            GLOBAL_POSITION_INT_COV_DATA::ID => {
33747                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
33748                    .map(Self::GLOBAL_POSITION_INT_COV)
33749            }
33750            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33751                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
33752                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
33753            }
33754            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
33755            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
33756            GPS_GLOBAL_ORIGIN_DATA::ID => {
33757                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
33758            }
33759            GPS_INJECT_DATA_DATA::ID => {
33760                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
33761            }
33762            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
33763            GPS_RAW_INT_DATA::ID => {
33764                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
33765            }
33766            GPS_RTCM_DATA_DATA::ID => {
33767                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
33768            }
33769            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
33770            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
33771            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
33772            HERELINK_TELEM_DATA::ID => {
33773                HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
33774            }
33775            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
33776                HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
33777                    .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
33778            }
33779            HIGHRES_IMU_DATA::ID => {
33780                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
33781            }
33782            HIGH_LATENCY_DATA::ID => {
33783                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
33784            }
33785            HIGH_LATENCY2_DATA::ID => {
33786                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
33787            }
33788            HIL_ACTUATOR_CONTROLS_DATA::ID => {
33789                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
33790            }
33791            HIL_CONTROLS_DATA::ID => {
33792                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
33793            }
33794            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
33795            HIL_OPTICAL_FLOW_DATA::ID => {
33796                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
33797            }
33798            HIL_RC_INPUTS_RAW_DATA::ID => {
33799                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
33800            }
33801            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
33802            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
33803            HIL_STATE_QUATERNION_DATA::ID => {
33804                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
33805            }
33806            HOME_POSITION_DATA::ID => {
33807                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
33808            }
33809            HYGROMETER_SENSOR_DATA::ID => {
33810                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
33811            }
33812            ILLUMINATOR_STATUS_DATA::ID => {
33813                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
33814            }
33815            ISBD_LINK_STATUS_DATA::ID => {
33816                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
33817            }
33818            LANDING_TARGET_DATA::ID => {
33819                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
33820            }
33821            LINK_NODE_STATUS_DATA::ID => {
33822                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
33823            }
33824            LOCAL_POSITION_NED_DATA::ID => {
33825                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
33826            }
33827            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
33828                .map(Self::LOCAL_POSITION_NED_COV),
33829            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33830                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
33831                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
33832            }
33833            LOGGING_ACK_DATA::ID => {
33834                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
33835            }
33836            LOGGING_DATA_DATA::ID => {
33837                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
33838            }
33839            LOGGING_DATA_ACKED_DATA::ID => {
33840                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
33841            }
33842            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
33843            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
33844            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
33845            LOG_REQUEST_DATA_DATA::ID => {
33846                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
33847            }
33848            LOG_REQUEST_END_DATA::ID => {
33849                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
33850            }
33851            LOG_REQUEST_LIST_DATA::ID => {
33852                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
33853            }
33854            MAG_CAL_REPORT_DATA::ID => {
33855                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
33856            }
33857            MANUAL_CONTROL_DATA::ID => {
33858                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
33859            }
33860            MANUAL_SETPOINT_DATA::ID => {
33861                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
33862            }
33863            MEMORY_VECT_DATA::ID => {
33864                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
33865            }
33866            MESSAGE_INTERVAL_DATA::ID => {
33867                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
33868            }
33869            MISSION_ACK_DATA::ID => {
33870                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
33871            }
33872            MISSION_CLEAR_ALL_DATA::ID => {
33873                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
33874            }
33875            MISSION_COUNT_DATA::ID => {
33876                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
33877            }
33878            MISSION_CURRENT_DATA::ID => {
33879                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
33880            }
33881            MISSION_ITEM_DATA::ID => {
33882                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
33883            }
33884            MISSION_ITEM_INT_DATA::ID => {
33885                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
33886            }
33887            MISSION_ITEM_REACHED_DATA::ID => {
33888                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
33889            }
33890            MISSION_REQUEST_DATA::ID => {
33891                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
33892            }
33893            MISSION_REQUEST_INT_DATA::ID => {
33894                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
33895            }
33896            MISSION_REQUEST_LIST_DATA::ID => {
33897                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
33898            }
33899            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
33900                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
33901                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
33902            }
33903            MISSION_SET_CURRENT_DATA::ID => {
33904                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
33905            }
33906            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
33907                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
33908                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
33909            }
33910            MOUNT_ORIENTATION_DATA::ID => {
33911                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
33912            }
33913            NAMED_VALUE_FLOAT_DATA::ID => {
33914                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
33915            }
33916            NAMED_VALUE_INT_DATA::ID => {
33917                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
33918            }
33919            NAV_CONTROLLER_OUTPUT_DATA::ID => {
33920                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
33921            }
33922            OBSTACLE_DISTANCE_DATA::ID => {
33923                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
33924            }
33925            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
33926            ONBOARD_COMPUTER_STATUS_DATA::ID => {
33927                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
33928                    .map(Self::ONBOARD_COMPUTER_STATUS)
33929            }
33930            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
33931                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
33932                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
33933            }
33934            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
33935                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
33936                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
33937            }
33938            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
33939                .map(Self::OPEN_DRONE_ID_BASIC_ID),
33940            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
33941                .map(Self::OPEN_DRONE_ID_LOCATION),
33942            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
33943                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
33944                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
33945            }
33946            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
33947                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
33948                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
33949            }
33950            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
33951                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
33952            }
33953            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
33954                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
33955            }
33956            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
33957                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
33958                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
33959            }
33960            OPTICAL_FLOW_DATA::ID => {
33961                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
33962            }
33963            OPTICAL_FLOW_RAD_DATA::ID => {
33964                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
33965            }
33966            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
33967                .map(Self::ORBIT_EXECUTION_STATUS),
33968            PARAM_EXT_ACK_DATA::ID => {
33969                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
33970            }
33971            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
33972                .map(Self::PARAM_EXT_REQUEST_LIST),
33973            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
33974                .map(Self::PARAM_EXT_REQUEST_READ),
33975            PARAM_EXT_SET_DATA::ID => {
33976                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
33977            }
33978            PARAM_EXT_VALUE_DATA::ID => {
33979                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
33980            }
33981            PARAM_MAP_RC_DATA::ID => {
33982                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
33983            }
33984            PARAM_REQUEST_LIST_DATA::ID => {
33985                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
33986            }
33987            PARAM_REQUEST_READ_DATA::ID => {
33988                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
33989            }
33990            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
33991            PARAM_VALUE_DATA::ID => {
33992                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
33993            }
33994            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
33995            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
33996            PLAY_TUNE_V2_DATA::ID => {
33997                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
33998            }
33999            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34000                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34001                    .map(Self::POSITION_TARGET_GLOBAL_INT)
34002            }
34003            POSITION_TARGET_LOCAL_NED_DATA::ID => {
34004                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34005                    .map(Self::POSITION_TARGET_LOCAL_NED)
34006            }
34007            POWER_STATUS_DATA::ID => {
34008                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
34009            }
34010            PROTOCOL_VERSION_DATA::ID => {
34011                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
34012            }
34013            RADIO_STATUS_DATA::ID => {
34014                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
34015            }
34016            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
34017            RAW_PRESSURE_DATA::ID => {
34018                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
34019            }
34020            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
34021            RC_CHANNELS_DATA::ID => {
34022                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
34023            }
34024            RC_CHANNELS_OVERRIDE_DATA::ID => {
34025                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
34026            }
34027            RC_CHANNELS_RAW_DATA::ID => {
34028                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
34029            }
34030            RC_CHANNELS_SCALED_DATA::ID => {
34031                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
34032            }
34033            REQUEST_DATA_STREAM_DATA::ID => {
34034                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
34035            }
34036            REQUEST_EVENT_DATA::ID => {
34037                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
34038            }
34039            RESOURCE_REQUEST_DATA::ID => {
34040                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
34041            }
34042            RESPONSE_EVENT_ERROR_DATA::ID => {
34043                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
34044            }
34045            SAFETY_ALLOWED_AREA_DATA::ID => {
34046                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
34047            }
34048            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
34049                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
34050                    .map(Self::SAFETY_SET_ALLOWED_AREA)
34051            }
34052            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
34053            SCALED_IMU2_DATA::ID => {
34054                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
34055            }
34056            SCALED_IMU3_DATA::ID => {
34057                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
34058            }
34059            SCALED_PRESSURE_DATA::ID => {
34060                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
34061            }
34062            SCALED_PRESSURE2_DATA::ID => {
34063                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
34064            }
34065            SCALED_PRESSURE3_DATA::ID => {
34066                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
34067            }
34068            SERIAL_CONTROL_DATA::ID => {
34069                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
34070            }
34071            SERVO_OUTPUT_RAW_DATA::ID => {
34072                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
34073            }
34074            SETUP_SIGNING_DATA::ID => {
34075                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
34076            }
34077            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
34078                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34079                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
34080            }
34081            SET_ATTITUDE_TARGET_DATA::ID => {
34082                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
34083            }
34084            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
34085                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
34086            }
34087            SET_HOME_POSITION_DATA::ID => {
34088                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
34089            }
34090            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
34091            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34092                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
34093                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
34094            }
34095            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
34096                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
34097                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
34098            }
34099            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
34100            SMART_BATTERY_INFO_DATA::ID => {
34101                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
34102            }
34103            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
34104            STORAGE_INFORMATION_DATA::ID => {
34105                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
34106            }
34107            SUPPORTED_TUNES_DATA::ID => {
34108                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
34109            }
34110            SYSTEM_TIME_DATA::ID => {
34111                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
34112            }
34113            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
34114            TERRAIN_CHECK_DATA::ID => {
34115                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
34116            }
34117            TERRAIN_DATA_DATA::ID => {
34118                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
34119            }
34120            TERRAIN_REPORT_DATA::ID => {
34121                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
34122            }
34123            TERRAIN_REQUEST_DATA::ID => {
34124                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
34125            }
34126            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
34127            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
34128                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
34129                    .map(Self::TIME_ESTIMATE_TO_TARGET)
34130            }
34131            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34132                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
34133                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
34134            }
34135            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34136                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
34137                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
34138            }
34139            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
34140            UAVCAN_NODE_INFO_DATA::ID => {
34141                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
34142            }
34143            UAVCAN_NODE_STATUS_DATA::ID => {
34144                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
34145            }
34146            UTM_GLOBAL_POSITION_DATA::ID => {
34147                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
34148            }
34149            V2_EXTENSION_DATA::ID => {
34150                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
34151            }
34152            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
34153            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
34154            VICON_POSITION_ESTIMATE_DATA::ID => {
34155                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
34156                    .map(Self::VICON_POSITION_ESTIMATE)
34157            }
34158            VIDEO_STREAM_INFORMATION_DATA::ID => {
34159                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
34160                    .map(Self::VIDEO_STREAM_INFORMATION)
34161            }
34162            VIDEO_STREAM_STATUS_DATA::ID => {
34163                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
34164            }
34165            VISION_POSITION_ESTIMATE_DATA::ID => {
34166                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34167                    .map(Self::VISION_POSITION_ESTIMATE)
34168            }
34169            VISION_SPEED_ESTIMATE_DATA::ID => {
34170                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
34171            }
34172            WHEEL_DISTANCE_DATA::ID => {
34173                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
34174            }
34175            WIFI_CONFIG_AP_DATA::ID => {
34176                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
34177            }
34178            WINCH_STATUS_DATA::ID => {
34179                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
34180            }
34181            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
34182            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
34183        }
34184    }
34185    fn message_name(&self) -> &'static str {
34186        match self {
34187            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
34188            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
34189            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
34190            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
34191            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
34192            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
34193            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
34194            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
34195            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
34196            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
34197            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
34198            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34199                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
34200            }
34201            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
34202            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
34203            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
34204            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
34205            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
34206            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
34207            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
34208            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
34209            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
34210            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
34211            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
34212            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
34213            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
34214            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
34215            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
34216            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
34217            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
34218            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
34219            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
34220            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
34221            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
34222            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
34223            Self::COLLISION(..) => COLLISION_DATA::NAME,
34224            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
34225            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
34226            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
34227            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
34228            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
34229            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
34230            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
34231            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
34232            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
34233            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
34234            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
34235            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
34236            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
34237            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
34238            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
34239            Self::DEBUG(..) => DEBUG_DATA::NAME,
34240            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
34241            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
34242            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
34243            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
34244            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
34245            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
34246            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
34247            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
34248            Self::EVENT(..) => EVENT_DATA::NAME,
34249            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
34250            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
34251            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
34252            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
34253            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
34254            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
34255            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
34256            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
34257            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
34258            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
34259            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
34260            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
34261            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34262                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
34263            }
34264            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
34265            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
34266            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
34267            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
34268            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
34269            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
34270            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
34271            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
34272            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
34273            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
34274            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
34275            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
34276            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
34277            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
34278            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
34279            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
34280            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34281                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
34282            }
34283            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
34284            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
34285            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
34286            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
34287            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
34288            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
34289            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
34290            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
34291            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
34292            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
34293            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
34294            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
34295            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
34296            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
34297            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
34298            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
34299            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
34300            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
34301            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
34302            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34303                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
34304            }
34305            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
34306            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
34307            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
34308            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
34309            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
34310            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
34311            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
34312            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
34313            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
34314            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
34315            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
34316            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
34317            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
34318            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
34319            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
34320            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
34321            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
34322            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
34323            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
34324            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
34325            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
34326            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
34327            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
34328            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
34329            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
34330            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
34331            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
34332            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
34333            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
34334            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
34335            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
34336            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
34337            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
34338            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
34339            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
34340            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
34341            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
34342            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
34343            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
34344            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
34345            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
34346            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
34347            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
34348            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
34349            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
34350            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
34351            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
34352            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
34353            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
34354            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
34355            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
34356            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
34357            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
34358            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
34359            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
34360            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
34361            Self::PING(..) => PING_DATA::NAME,
34362            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
34363            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
34364            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34365            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
34366            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
34367            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
34368            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
34369            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
34370            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
34371            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
34372            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
34373            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
34374            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
34375            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
34376            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
34377            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
34378            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
34379            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
34380            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
34381            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
34382            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
34383            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
34384            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
34385            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
34386            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
34387            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
34388            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
34389            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
34390            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
34391            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
34392            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
34393            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
34394            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
34395            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
34396            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
34397            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
34398            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
34399            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
34400            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
34401            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
34402            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
34403            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
34404            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
34405            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
34406            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
34407            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
34408            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
34409            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
34410            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
34411            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
34412                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
34413            }
34414            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34415                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
34416            }
34417            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
34418            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
34419            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
34420            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
34421            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
34422            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
34423            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
34424            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
34425            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
34426            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
34427            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
34428            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
34429            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
34430            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
34431            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
34432            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
34433        }
34434    }
34435    fn message_id(&self) -> u32 {
34436        match self {
34437            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
34438            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
34439            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
34440            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
34441            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
34442            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
34443            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
34444            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
34445            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
34446            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
34447            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
34448            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
34449                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
34450            }
34451            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
34452            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
34453            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
34454            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
34455            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
34456            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
34457            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
34458            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
34459            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
34460            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
34461            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
34462            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
34463            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
34464            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
34465            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
34466            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
34467            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
34468            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
34469            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
34470            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
34471            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
34472            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
34473            Self::COLLISION(..) => COLLISION_DATA::ID,
34474            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
34475            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
34476            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
34477            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
34478            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
34479            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
34480            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
34481            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
34482            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
34483            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
34484            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
34485            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
34486            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
34487            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
34488            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
34489            Self::DEBUG(..) => DEBUG_DATA::ID,
34490            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
34491            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
34492            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
34493            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
34494            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
34495            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
34496            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
34497            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
34498            Self::EVENT(..) => EVENT_DATA::ID,
34499            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
34500            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
34501            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
34502            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
34503            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
34504            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
34505            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
34506            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
34507            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
34508            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
34509            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
34510            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
34511            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
34512                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
34513            }
34514            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
34515            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
34516            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
34517            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
34518            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
34519            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
34520            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
34521            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
34522            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
34523            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
34524            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
34525            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
34526            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
34527            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
34528            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
34529            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
34530            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
34531                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
34532            }
34533            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
34534            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
34535            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
34536            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
34537            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
34538            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
34539            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
34540            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
34541            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
34542            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
34543            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
34544            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
34545            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
34546            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
34547            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
34548            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
34549            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
34550            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
34551            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
34552            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
34553                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
34554            }
34555            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
34556            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
34557            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
34558            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
34559            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
34560            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
34561            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
34562            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
34563            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
34564            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
34565            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
34566            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
34567            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
34568            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
34569            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
34570            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
34571            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
34572            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
34573            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
34574            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
34575            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
34576            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
34577            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
34578            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
34579            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
34580            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
34581            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
34582            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
34583            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
34584            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
34585            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
34586            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
34587            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
34588            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
34589            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
34590            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
34591            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
34592            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
34593            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
34594            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
34595            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
34596            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
34597            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
34598            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
34599            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
34600            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
34601            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
34602            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
34603            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
34604            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
34605            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
34606            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
34607            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
34608            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
34609            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
34610            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
34611            Self::PING(..) => PING_DATA::ID,
34612            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
34613            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
34614            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
34615            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
34616            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
34617            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
34618            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
34619            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
34620            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
34621            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
34622            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
34623            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
34624            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
34625            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
34626            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
34627            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
34628            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
34629            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
34630            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
34631            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
34632            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
34633            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
34634            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
34635            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
34636            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
34637            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
34638            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
34639            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
34640            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
34641            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
34642            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
34643            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
34644            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
34645            Self::SET_MODE(..) => SET_MODE_DATA::ID,
34646            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
34647            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
34648            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
34649            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
34650            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
34651            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
34652            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
34653            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
34654            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
34655            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
34656            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
34657            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
34658            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
34659            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
34660            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
34661            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
34662            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
34663                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
34664            }
34665            Self::TUNNEL(..) => TUNNEL_DATA::ID,
34666            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
34667            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
34668            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
34669            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
34670            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
34671            Self::VIBRATION(..) => VIBRATION_DATA::ID,
34672            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
34673            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
34674            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
34675            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
34676            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
34677            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
34678            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
34679            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
34680            Self::WIND_COV(..) => WIND_COV_DATA::ID,
34681        }
34682    }
34683    fn message_id_from_name(name: &str) -> Option<u32> {
34684        match name {
34685            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
34686            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
34687            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
34688            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
34689            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
34690            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
34691            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
34692            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
34693            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
34694            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
34695            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
34696            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
34697                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
34698            }
34699            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
34700            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
34701            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
34702            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
34703            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
34704            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
34705            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
34706            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
34707            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
34708            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
34709            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
34710            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
34711            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
34712            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
34713            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
34714            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
34715            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
34716            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
34717            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
34718            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
34719            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
34720            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
34721            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
34722            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
34723            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
34724            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
34725            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
34726            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
34727            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
34728            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
34729            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
34730            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
34731                Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
34732            }
34733            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
34734                Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
34735            }
34736            CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
34737            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
34738            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
34739            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
34740            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
34741            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
34742            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
34743            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
34744            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
34745            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
34746            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
34747            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
34748            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
34749            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
34750            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
34751            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
34752            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
34753            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
34754            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
34755            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
34756            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
34757            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
34758            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
34759                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
34760            }
34761            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
34762            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
34763            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
34764            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
34765            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
34766                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
34767            }
34768            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
34769            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
34770            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
34771            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
34772            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
34773                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
34774            }
34775            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
34776            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
34777            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
34778            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
34779            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
34780            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
34781            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
34782            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
34783            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
34784            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
34785            HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
34786            HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
34787                Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
34788            }
34789            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
34790            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
34791            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
34792            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
34793            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
34794            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
34795            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
34796            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
34797            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
34798            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
34799            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
34800            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
34801            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
34802            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
34803            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
34804            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
34805            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
34806            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
34807            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
34808            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
34809                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
34810            }
34811            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
34812            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
34813            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
34814            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
34815            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
34816            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
34817            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
34818            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
34819            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
34820            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
34821            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
34822            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
34823            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
34824            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
34825            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
34826            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
34827            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
34828            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
34829            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
34830            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
34831            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
34832            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
34833            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
34834            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
34835            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
34836            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
34837            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
34838            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
34839            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
34840            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
34841            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
34842            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
34843            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
34844            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
34845            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
34846            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
34847            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
34848            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
34849            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
34850            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
34851            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
34852            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
34853            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
34854            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
34855            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
34856            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
34857            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
34858            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
34859            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
34860            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
34861            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
34862            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
34863            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
34864            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
34865            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
34866            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
34867            PING_DATA::NAME => Some(PING_DATA::ID),
34868            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
34869            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
34870            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
34871            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
34872            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
34873            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
34874            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
34875            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
34876            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
34877            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
34878            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
34879            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
34880            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
34881            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
34882            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
34883            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
34884            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
34885            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
34886            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
34887            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
34888            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
34889            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
34890            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
34891            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
34892            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
34893            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
34894            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
34895            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
34896            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
34897            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
34898            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
34899            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
34900            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
34901            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
34902            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
34903                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
34904            }
34905            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
34906                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
34907            }
34908            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
34909            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
34910            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
34911            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
34912            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
34913            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
34914            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
34915            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
34916            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
34917            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
34918            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
34919            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
34920            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
34921            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
34922                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
34923            }
34924            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
34925                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
34926            }
34927            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
34928            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
34929            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
34930            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
34931            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
34932            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
34933            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
34934            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
34935            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
34936            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
34937            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
34938            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
34939            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
34940            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
34941            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
34942            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
34943            _ => None,
34944        }
34945    }
34946    fn default_message_from_id(id: u32) -> Option<Self> {
34947        match id {
34948            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
34949                ACTUATOR_CONTROL_TARGET_DATA::default(),
34950            )),
34951            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
34952                ACTUATOR_OUTPUT_STATUS_DATA::default(),
34953            )),
34954            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
34955            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
34956            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
34957            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
34958            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
34959                ATTITUDE_QUATERNION_DATA::default(),
34960            )),
34961            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
34962                ATTITUDE_QUATERNION_COV_DATA::default(),
34963            )),
34964            ATTITUDE_TARGET_DATA::ID => {
34965                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
34966            }
34967            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
34968            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
34969            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34970                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
34971                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
34972                ))
34973            }
34974            AUTOPILOT_VERSION_DATA::ID => {
34975                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
34976            }
34977            AVAILABLE_MODES_DATA::ID => {
34978                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
34979            }
34980            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
34981                AVAILABLE_MODES_MONITOR_DATA::default(),
34982            )),
34983            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
34984            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
34985            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
34986            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
34987                CAMERA_CAPTURE_STATUS_DATA::default(),
34988            )),
34989            CAMERA_FOV_STATUS_DATA::ID => {
34990                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
34991            }
34992            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
34993                CAMERA_IMAGE_CAPTURED_DATA::default(),
34994            )),
34995            CAMERA_INFORMATION_DATA::ID => {
34996                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
34997            }
34998            CAMERA_SETTINGS_DATA::ID => {
34999                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
35000            }
35001            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35002                CAMERA_THERMAL_RANGE_DATA::default(),
35003            )),
35004            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35005                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
35006            )),
35007            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35008                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
35009            )),
35010            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
35011            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
35012            CAN_FILTER_MODIFY_DATA::ID => {
35013                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
35014            }
35015            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
35016            CELLULAR_CONFIG_DATA::ID => {
35017                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
35018            }
35019            CELLULAR_STATUS_DATA::ID => {
35020                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
35021            }
35022            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35023                CHANGE_OPERATOR_CONTROL_DATA::default(),
35024            )),
35025            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35026                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
35027            )),
35028            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
35029            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
35030            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
35031            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
35032            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
35033            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35034                COMPONENT_INFORMATION_DATA::default(),
35035            )),
35036            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35037                COMPONENT_INFORMATION_BASIC_DATA::default(),
35038            )),
35039            COMPONENT_METADATA_DATA::ID => {
35040                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
35041            }
35042            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35043                CONTROL_SYSTEM_STATE_DATA::default(),
35044            )),
35045            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
35046                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
35047            )),
35048            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35049                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
35050                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
35051                ))
35052            }
35053            CUBEPILOT_RAW_RC_DATA::ID => {
35054                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
35055            }
35056            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35057                CURRENT_EVENT_SEQUENCE_DATA::default(),
35058            )),
35059            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
35060            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
35061            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35062                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
35063            )),
35064            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
35065            DEBUG_FLOAT_ARRAY_DATA::ID => {
35066                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
35067            }
35068            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
35069            DISTANCE_SENSOR_DATA::ID => {
35070                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
35071            }
35072            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
35073            ENCAPSULATED_DATA_DATA::ID => {
35074                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
35075            }
35076            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
35077            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
35078            ESTIMATOR_STATUS_DATA::ID => {
35079                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
35080            }
35081            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
35082            EXTENDED_SYS_STATE_DATA::ID => {
35083                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
35084            }
35085            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
35086            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35087                FILE_TRANSFER_PROTOCOL_DATA::default(),
35088            )),
35089            FLIGHT_INFORMATION_DATA::ID => {
35090                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
35091            }
35092            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
35093            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
35094            GENERATOR_STATUS_DATA::ID => {
35095                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
35096            }
35097            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35098                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
35099            )),
35100            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35101                GIMBAL_DEVICE_INFORMATION_DATA::default(),
35102            )),
35103            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35104                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
35105            )),
35106            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35107                GIMBAL_MANAGER_INFORMATION_DATA::default(),
35108            )),
35109            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35110                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
35111            )),
35112            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35113                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35114                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
35115                ))
35116            }
35117            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35118                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
35119            )),
35120            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35121                GIMBAL_MANAGER_STATUS_DATA::default(),
35122            )),
35123            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35124                GLOBAL_POSITION_INT_DATA::default(),
35125            )),
35126            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35127                GLOBAL_POSITION_INT_COV_DATA::default(),
35128            )),
35129            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35130                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35131                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
35132                ))
35133            }
35134            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
35135            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
35136            GPS_GLOBAL_ORIGIN_DATA::ID => {
35137                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
35138            }
35139            GPS_INJECT_DATA_DATA::ID => {
35140                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
35141            }
35142            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
35143            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
35144            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
35145            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
35146            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
35147            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
35148            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
35149            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
35150                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
35151                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
35152                ))
35153            }
35154            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
35155            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
35156            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
35157            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35158                HIL_ACTUATOR_CONTROLS_DATA::default(),
35159            )),
35160            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
35161            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
35162            HIL_OPTICAL_FLOW_DATA::ID => {
35163                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
35164            }
35165            HIL_RC_INPUTS_RAW_DATA::ID => {
35166                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
35167            }
35168            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
35169            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
35170            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35171                HIL_STATE_QUATERNION_DATA::default(),
35172            )),
35173            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
35174            HYGROMETER_SENSOR_DATA::ID => {
35175                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
35176            }
35177            ILLUMINATOR_STATUS_DATA::ID => {
35178                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
35179            }
35180            ISBD_LINK_STATUS_DATA::ID => {
35181                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
35182            }
35183            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
35184            LINK_NODE_STATUS_DATA::ID => {
35185                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
35186            }
35187            LOCAL_POSITION_NED_DATA::ID => {
35188                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
35189            }
35190            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35191                LOCAL_POSITION_NED_COV_DATA::default(),
35192            )),
35193            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35194                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35195                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
35196                ))
35197            }
35198            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
35199            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
35200            LOGGING_DATA_ACKED_DATA::ID => {
35201                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
35202            }
35203            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
35204            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
35205            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
35206            LOG_REQUEST_DATA_DATA::ID => {
35207                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
35208            }
35209            LOG_REQUEST_END_DATA::ID => {
35210                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
35211            }
35212            LOG_REQUEST_LIST_DATA::ID => {
35213                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
35214            }
35215            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
35216            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
35217            MANUAL_SETPOINT_DATA::ID => {
35218                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
35219            }
35220            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
35221            MESSAGE_INTERVAL_DATA::ID => {
35222                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
35223            }
35224            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
35225            MISSION_CLEAR_ALL_DATA::ID => {
35226                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
35227            }
35228            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
35229            MISSION_CURRENT_DATA::ID => {
35230                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
35231            }
35232            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
35233            MISSION_ITEM_INT_DATA::ID => {
35234                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
35235            }
35236            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35237                MISSION_ITEM_REACHED_DATA::default(),
35238            )),
35239            MISSION_REQUEST_DATA::ID => {
35240                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
35241            }
35242            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35243                MISSION_REQUEST_INT_DATA::default(),
35244            )),
35245            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35246                MISSION_REQUEST_LIST_DATA::default(),
35247            )),
35248            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35249                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
35250            )),
35251            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35252                MISSION_SET_CURRENT_DATA::default(),
35253            )),
35254            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35255                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
35256            )),
35257            MOUNT_ORIENTATION_DATA::ID => {
35258                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
35259            }
35260            NAMED_VALUE_FLOAT_DATA::ID => {
35261                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
35262            }
35263            NAMED_VALUE_INT_DATA::ID => {
35264                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
35265            }
35266            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35267                NAV_CONTROLLER_OUTPUT_DATA::default(),
35268            )),
35269            OBSTACLE_DISTANCE_DATA::ID => {
35270                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
35271            }
35272            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
35273            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35274                ONBOARD_COMPUTER_STATUS_DATA::default(),
35275            )),
35276            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35277                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
35278            )),
35279            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35280                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
35281            )),
35282            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35283                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
35284            )),
35285            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35286                OPEN_DRONE_ID_LOCATION_DATA::default(),
35287            )),
35288            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35289                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
35290            )),
35291            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35292                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
35293            )),
35294            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35295                OPEN_DRONE_ID_SELF_ID_DATA::default(),
35296            )),
35297            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35298                OPEN_DRONE_ID_SYSTEM_DATA::default(),
35299            )),
35300            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35301                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
35302            )),
35303            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
35304            OPTICAL_FLOW_RAD_DATA::ID => {
35305                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
35306            }
35307            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35308                ORBIT_EXECUTION_STATUS_DATA::default(),
35309            )),
35310            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
35311            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35312                PARAM_EXT_REQUEST_LIST_DATA::default(),
35313            )),
35314            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35315                PARAM_EXT_REQUEST_READ_DATA::default(),
35316            )),
35317            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
35318            PARAM_EXT_VALUE_DATA::ID => {
35319                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
35320            }
35321            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
35322            PARAM_REQUEST_LIST_DATA::ID => {
35323                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
35324            }
35325            PARAM_REQUEST_READ_DATA::ID => {
35326                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
35327            }
35328            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
35329            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
35330            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
35331            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
35332            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
35333            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35334                POSITION_TARGET_GLOBAL_INT_DATA::default(),
35335            )),
35336            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35337                POSITION_TARGET_LOCAL_NED_DATA::default(),
35338            )),
35339            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
35340            PROTOCOL_VERSION_DATA::ID => {
35341                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
35342            }
35343            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
35344            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
35345            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
35346            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
35347            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
35348            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35349                RC_CHANNELS_OVERRIDE_DATA::default(),
35350            )),
35351            RC_CHANNELS_RAW_DATA::ID => {
35352                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
35353            }
35354            RC_CHANNELS_SCALED_DATA::ID => {
35355                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
35356            }
35357            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35358                REQUEST_DATA_STREAM_DATA::default(),
35359            )),
35360            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
35361            RESOURCE_REQUEST_DATA::ID => {
35362                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
35363            }
35364            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35365                RESPONSE_EVENT_ERROR_DATA::default(),
35366            )),
35367            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35368                SAFETY_ALLOWED_AREA_DATA::default(),
35369            )),
35370            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35371                SAFETY_SET_ALLOWED_AREA_DATA::default(),
35372            )),
35373            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
35374            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
35375            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
35376            SCALED_PRESSURE_DATA::ID => {
35377                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
35378            }
35379            SCALED_PRESSURE2_DATA::ID => {
35380                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
35381            }
35382            SCALED_PRESSURE3_DATA::ID => {
35383                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
35384            }
35385            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
35386            SERVO_OUTPUT_RAW_DATA::ID => {
35387                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
35388            }
35389            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
35390            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35391                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
35392            )),
35393            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35394                SET_ATTITUDE_TARGET_DATA::default(),
35395            )),
35396            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35397                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
35398            )),
35399            SET_HOME_POSITION_DATA::ID => {
35400                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
35401            }
35402            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
35403            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35404                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
35405            )),
35406            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35407                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
35408            )),
35409            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
35410            SMART_BATTERY_INFO_DATA::ID => {
35411                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
35412            }
35413            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
35414            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35415                STORAGE_INFORMATION_DATA::default(),
35416            )),
35417            SUPPORTED_TUNES_DATA::ID => {
35418                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
35419            }
35420            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
35421            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
35422            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
35423            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
35424            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
35425            TERRAIN_REQUEST_DATA::ID => {
35426                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
35427            }
35428            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
35429            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35430                TIME_ESTIMATE_TO_TARGET_DATA::default(),
35431            )),
35432            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35433                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35434                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
35435                ))
35436            }
35437            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35438                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35439                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
35440                ))
35441            }
35442            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
35443            UAVCAN_NODE_INFO_DATA::ID => {
35444                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
35445            }
35446            UAVCAN_NODE_STATUS_DATA::ID => {
35447                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
35448            }
35449            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35450                UTM_GLOBAL_POSITION_DATA::default(),
35451            )),
35452            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
35453            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
35454            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
35455            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35456                VICON_POSITION_ESTIMATE_DATA::default(),
35457            )),
35458            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35459                VIDEO_STREAM_INFORMATION_DATA::default(),
35460            )),
35461            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35462                VIDEO_STREAM_STATUS_DATA::default(),
35463            )),
35464            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35465                VISION_POSITION_ESTIMATE_DATA::default(),
35466            )),
35467            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
35468                VISION_SPEED_ESTIMATE_DATA::default(),
35469            )),
35470            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
35471            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
35472            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
35473            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
35474            _ => None,
35475        }
35476    }
35477    #[cfg(feature = "arbitrary")]
35478    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
35479        match id {
35480            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
35481                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35482            )),
35483            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
35484                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
35485            )),
35486            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
35487            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
35488            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
35489            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
35490            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
35491                ATTITUDE_QUATERNION_DATA::random(rng),
35492            )),
35493            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
35494                ATTITUDE_QUATERNION_COV_DATA::random(rng),
35495            )),
35496            ATTITUDE_TARGET_DATA::ID => {
35497                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
35498            }
35499            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
35500            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
35501            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35502                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
35503                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
35504                ))
35505            }
35506            AUTOPILOT_VERSION_DATA::ID => {
35507                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
35508            }
35509            AVAILABLE_MODES_DATA::ID => {
35510                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
35511            }
35512            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
35513                AVAILABLE_MODES_MONITOR_DATA::random(rng),
35514            )),
35515            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
35516            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
35517            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
35518            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
35519                CAMERA_CAPTURE_STATUS_DATA::random(rng),
35520            )),
35521            CAMERA_FOV_STATUS_DATA::ID => {
35522                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
35523            }
35524            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
35525                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
35526            )),
35527            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
35528                CAMERA_INFORMATION_DATA::random(rng),
35529            )),
35530            CAMERA_SETTINGS_DATA::ID => {
35531                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
35532            }
35533            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
35534                CAMERA_THERMAL_RANGE_DATA::random(rng),
35535            )),
35536            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
35537                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
35538            )),
35539            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
35540                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
35541            )),
35542            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
35543            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
35544            CAN_FILTER_MODIFY_DATA::ID => {
35545                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
35546            }
35547            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
35548            CELLULAR_CONFIG_DATA::ID => {
35549                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
35550            }
35551            CELLULAR_STATUS_DATA::ID => {
35552                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
35553            }
35554            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
35555                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
35556            )),
35557            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
35558                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
35559            )),
35560            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
35561            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
35562            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
35563            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
35564            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
35565            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
35566                COMPONENT_INFORMATION_DATA::random(rng),
35567            )),
35568            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
35569                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
35570            )),
35571            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
35572                COMPONENT_METADATA_DATA::random(rng),
35573            )),
35574            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
35575                CONTROL_SYSTEM_STATE_DATA::random(rng),
35576            )),
35577            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
35578                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
35579            )),
35580            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
35581                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
35582                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
35583                ))
35584            }
35585            CUBEPILOT_RAW_RC_DATA::ID => {
35586                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
35587            }
35588            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
35589                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
35590            )),
35591            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
35592            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
35593            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
35594                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
35595            )),
35596            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
35597            DEBUG_FLOAT_ARRAY_DATA::ID => {
35598                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
35599            }
35600            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
35601            DISTANCE_SENSOR_DATA::ID => {
35602                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
35603            }
35604            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
35605            ENCAPSULATED_DATA_DATA::ID => {
35606                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
35607            }
35608            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
35609            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
35610            ESTIMATOR_STATUS_DATA::ID => {
35611                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
35612            }
35613            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
35614            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
35615                EXTENDED_SYS_STATE_DATA::random(rng),
35616            )),
35617            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
35618            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
35619                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
35620            )),
35621            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
35622                FLIGHT_INFORMATION_DATA::random(rng),
35623            )),
35624            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
35625            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
35626            GENERATOR_STATUS_DATA::ID => {
35627                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
35628            }
35629            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
35630                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
35631            )),
35632            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
35633                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
35634            )),
35635            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
35636                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
35637            )),
35638            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
35639                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
35640            )),
35641            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
35642                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
35643            )),
35644            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35645                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
35646                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
35647                ))
35648            }
35649            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
35650                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
35651            )),
35652            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
35653                GIMBAL_MANAGER_STATUS_DATA::random(rng),
35654            )),
35655            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
35656                GLOBAL_POSITION_INT_DATA::random(rng),
35657            )),
35658            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
35659                GLOBAL_POSITION_INT_COV_DATA::random(rng),
35660            )),
35661            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35662                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
35663                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
35664                ))
35665            }
35666            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
35667            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
35668            GPS_GLOBAL_ORIGIN_DATA::ID => {
35669                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
35670            }
35671            GPS_INJECT_DATA_DATA::ID => {
35672                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
35673            }
35674            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
35675            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
35676            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
35677            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
35678            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
35679            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
35680            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
35681            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
35682                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
35683                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
35684                ))
35685            }
35686            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
35687            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
35688            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
35689            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
35690                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
35691            )),
35692            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
35693            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
35694            HIL_OPTICAL_FLOW_DATA::ID => {
35695                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
35696            }
35697            HIL_RC_INPUTS_RAW_DATA::ID => {
35698                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
35699            }
35700            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
35701            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
35702            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
35703                HIL_STATE_QUATERNION_DATA::random(rng),
35704            )),
35705            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
35706            HYGROMETER_SENSOR_DATA::ID => {
35707                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
35708            }
35709            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
35710                ILLUMINATOR_STATUS_DATA::random(rng),
35711            )),
35712            ISBD_LINK_STATUS_DATA::ID => {
35713                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
35714            }
35715            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
35716            LINK_NODE_STATUS_DATA::ID => {
35717                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
35718            }
35719            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
35720                LOCAL_POSITION_NED_DATA::random(rng),
35721            )),
35722            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
35723                LOCAL_POSITION_NED_COV_DATA::random(rng),
35724            )),
35725            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35726                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
35727                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
35728                ))
35729            }
35730            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
35731            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
35732            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
35733                LOGGING_DATA_ACKED_DATA::random(rng),
35734            )),
35735            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
35736            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
35737            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
35738            LOG_REQUEST_DATA_DATA::ID => {
35739                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
35740            }
35741            LOG_REQUEST_END_DATA::ID => {
35742                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
35743            }
35744            LOG_REQUEST_LIST_DATA::ID => {
35745                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
35746            }
35747            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
35748            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
35749            MANUAL_SETPOINT_DATA::ID => {
35750                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
35751            }
35752            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
35753            MESSAGE_INTERVAL_DATA::ID => {
35754                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
35755            }
35756            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
35757            MISSION_CLEAR_ALL_DATA::ID => {
35758                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
35759            }
35760            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
35761            MISSION_CURRENT_DATA::ID => {
35762                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
35763            }
35764            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
35765            MISSION_ITEM_INT_DATA::ID => {
35766                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
35767            }
35768            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
35769                MISSION_ITEM_REACHED_DATA::random(rng),
35770            )),
35771            MISSION_REQUEST_DATA::ID => {
35772                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
35773            }
35774            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
35775                MISSION_REQUEST_INT_DATA::random(rng),
35776            )),
35777            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
35778                MISSION_REQUEST_LIST_DATA::random(rng),
35779            )),
35780            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
35781                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
35782            )),
35783            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
35784                MISSION_SET_CURRENT_DATA::random(rng),
35785            )),
35786            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
35787                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
35788            )),
35789            MOUNT_ORIENTATION_DATA::ID => {
35790                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
35791            }
35792            NAMED_VALUE_FLOAT_DATA::ID => {
35793                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
35794            }
35795            NAMED_VALUE_INT_DATA::ID => {
35796                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
35797            }
35798            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
35799                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
35800            )),
35801            OBSTACLE_DISTANCE_DATA::ID => {
35802                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
35803            }
35804            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
35805            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
35806                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
35807            )),
35808            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
35809                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
35810            )),
35811            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
35812                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
35813            )),
35814            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
35815                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
35816            )),
35817            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
35818                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
35819            )),
35820            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
35821                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
35822            )),
35823            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
35824                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
35825            )),
35826            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
35827                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
35828            )),
35829            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
35830                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
35831            )),
35832            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
35833                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
35834            )),
35835            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
35836            OPTICAL_FLOW_RAD_DATA::ID => {
35837                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
35838            }
35839            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
35840                ORBIT_EXECUTION_STATUS_DATA::random(rng),
35841            )),
35842            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
35843            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
35844                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
35845            )),
35846            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
35847                PARAM_EXT_REQUEST_READ_DATA::random(rng),
35848            )),
35849            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
35850            PARAM_EXT_VALUE_DATA::ID => {
35851                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
35852            }
35853            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
35854            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
35855                PARAM_REQUEST_LIST_DATA::random(rng),
35856            )),
35857            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
35858                PARAM_REQUEST_READ_DATA::random(rng),
35859            )),
35860            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
35861            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
35862            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
35863            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
35864            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
35865            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
35866                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35867            )),
35868            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
35869                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35870            )),
35871            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
35872            PROTOCOL_VERSION_DATA::ID => {
35873                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
35874            }
35875            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
35876            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
35877            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
35878            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
35879            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
35880            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
35881                RC_CHANNELS_OVERRIDE_DATA::random(rng),
35882            )),
35883            RC_CHANNELS_RAW_DATA::ID => {
35884                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
35885            }
35886            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
35887                RC_CHANNELS_SCALED_DATA::random(rng),
35888            )),
35889            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
35890                REQUEST_DATA_STREAM_DATA::random(rng),
35891            )),
35892            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
35893            RESOURCE_REQUEST_DATA::ID => {
35894                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
35895            }
35896            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
35897                RESPONSE_EVENT_ERROR_DATA::random(rng),
35898            )),
35899            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
35900                SAFETY_ALLOWED_AREA_DATA::random(rng),
35901            )),
35902            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
35903                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
35904            )),
35905            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
35906            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
35907            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
35908            SCALED_PRESSURE_DATA::ID => {
35909                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
35910            }
35911            SCALED_PRESSURE2_DATA::ID => {
35912                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
35913            }
35914            SCALED_PRESSURE3_DATA::ID => {
35915                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
35916            }
35917            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
35918            SERVO_OUTPUT_RAW_DATA::ID => {
35919                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
35920            }
35921            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
35922            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
35923                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
35924            )),
35925            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
35926                SET_ATTITUDE_TARGET_DATA::random(rng),
35927            )),
35928            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
35929                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
35930            )),
35931            SET_HOME_POSITION_DATA::ID => {
35932                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
35933            }
35934            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
35935            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
35936                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
35937            )),
35938            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
35939                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
35940            )),
35941            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
35942            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
35943                SMART_BATTERY_INFO_DATA::random(rng),
35944            )),
35945            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
35946            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
35947                STORAGE_INFORMATION_DATA::random(rng),
35948            )),
35949            SUPPORTED_TUNES_DATA::ID => {
35950                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
35951            }
35952            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
35953            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
35954            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
35955            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
35956            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
35957            TERRAIN_REQUEST_DATA::ID => {
35958                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
35959            }
35960            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
35961            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
35962                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
35963            )),
35964            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35965                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
35966                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
35967                ))
35968            }
35969            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35970                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
35971                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
35972                ))
35973            }
35974            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
35975            UAVCAN_NODE_INFO_DATA::ID => {
35976                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
35977            }
35978            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
35979                UAVCAN_NODE_STATUS_DATA::random(rng),
35980            )),
35981            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
35982                UTM_GLOBAL_POSITION_DATA::random(rng),
35983            )),
35984            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
35985            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
35986            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
35987            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
35988                VICON_POSITION_ESTIMATE_DATA::random(rng),
35989            )),
35990            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
35991                VIDEO_STREAM_INFORMATION_DATA::random(rng),
35992            )),
35993            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
35994                VIDEO_STREAM_STATUS_DATA::random(rng),
35995            )),
35996            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
35997                VISION_POSITION_ESTIMATE_DATA::random(rng),
35998            )),
35999            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36000                VISION_SPEED_ESTIMATE_DATA::random(rng),
36001            )),
36002            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
36003            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
36004            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
36005            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
36006            _ => None,
36007        }
36008    }
36009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
36010        match self {
36011            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36012            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
36013            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
36014            Self::AIS_VESSEL(body) => body.ser(version, bytes),
36015            Self::ALTITUDE(body) => body.ser(version, bytes),
36016            Self::ATTITUDE(body) => body.ser(version, bytes),
36017            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
36018            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
36019            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
36020            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
36021            Self::AUTH_KEY(body) => body.ser(version, bytes),
36022            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
36023            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
36024            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
36025            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
36026            Self::BATTERY_INFO(body) => body.ser(version, bytes),
36027            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
36028            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
36029            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
36030            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
36031            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
36032            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
36033            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
36034            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
36035            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
36036            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
36037            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
36038            Self::CANFD_FRAME(body) => body.ser(version, bytes),
36039            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
36040            Self::CAN_FRAME(body) => body.ser(version, bytes),
36041            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
36042            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
36043            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
36044            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
36045            Self::COLLISION(body) => body.ser(version, bytes),
36046            Self::COMMAND_ACK(body) => body.ser(version, bytes),
36047            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
36048            Self::COMMAND_INT(body) => body.ser(version, bytes),
36049            Self::COMMAND_LONG(body) => body.ser(version, bytes),
36050            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
36051            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
36052            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
36053            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
36054            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
36055            Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
36056            Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
36057            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
36058            Self::CURRENT_MODE(body) => body.ser(version, bytes),
36059            Self::DATA_STREAM(body) => body.ser(version, bytes),
36060            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
36061            Self::DEBUG(body) => body.ser(version, bytes),
36062            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
36063            Self::DEBUG_VECT(body) => body.ser(version, bytes),
36064            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
36065            Self::EFI_STATUS(body) => body.ser(version, bytes),
36066            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
36067            Self::ESC_INFO(body) => body.ser(version, bytes),
36068            Self::ESC_STATUS(body) => body.ser(version, bytes),
36069            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
36070            Self::EVENT(body) => body.ser(version, bytes),
36071            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
36072            Self::FENCE_STATUS(body) => body.ser(version, bytes),
36073            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
36074            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
36075            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
36076            Self::FUEL_STATUS(body) => body.ser(version, bytes),
36077            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
36078            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
36079            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
36080            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
36081            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
36082            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
36083            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
36084            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
36085            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
36086            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
36087            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
36088            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36089            Self::GPS2_RAW(body) => body.ser(version, bytes),
36090            Self::GPS2_RTK(body) => body.ser(version, bytes),
36091            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36092            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
36093            Self::GPS_INPUT(body) => body.ser(version, bytes),
36094            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
36095            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
36096            Self::GPS_RTK(body) => body.ser(version, bytes),
36097            Self::GPS_STATUS(body) => body.ser(version, bytes),
36098            Self::HEARTBEAT(body) => body.ser(version, bytes),
36099            Self::HERELINK_TELEM(body) => body.ser(version, bytes),
36100            Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36101            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
36102            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
36103            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
36104            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
36105            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
36106            Self::HIL_GPS(body) => body.ser(version, bytes),
36107            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
36108            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
36109            Self::HIL_SENSOR(body) => body.ser(version, bytes),
36110            Self::HIL_STATE(body) => body.ser(version, bytes),
36111            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
36112            Self::HOME_POSITION(body) => body.ser(version, bytes),
36113            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
36114            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
36115            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
36116            Self::LANDING_TARGET(body) => body.ser(version, bytes),
36117            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
36118            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
36119            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
36120            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
36121            Self::LOGGING_ACK(body) => body.ser(version, bytes),
36122            Self::LOGGING_DATA(body) => body.ser(version, bytes),
36123            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
36124            Self::LOG_DATA(body) => body.ser(version, bytes),
36125            Self::LOG_ENTRY(body) => body.ser(version, bytes),
36126            Self::LOG_ERASE(body) => body.ser(version, bytes),
36127            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
36128            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
36129            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
36130            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
36131            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
36132            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
36133            Self::MEMORY_VECT(body) => body.ser(version, bytes),
36134            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
36135            Self::MISSION_ACK(body) => body.ser(version, bytes),
36136            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
36137            Self::MISSION_COUNT(body) => body.ser(version, bytes),
36138            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
36139            Self::MISSION_ITEM(body) => body.ser(version, bytes),
36140            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
36141            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
36142            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
36143            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
36144            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
36145            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
36146            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
36147            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
36148            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
36149            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
36150            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
36151            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
36152            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
36153            Self::ODOMETRY(body) => body.ser(version, bytes),
36154            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
36155            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
36156            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
36157            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
36158            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
36159            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
36160            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
36161            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
36162            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
36163            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
36164            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
36165            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
36166            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
36167            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
36168            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
36169            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
36170            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
36171            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
36172            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
36173            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
36174            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
36175            Self::PARAM_SET(body) => body.ser(version, bytes),
36176            Self::PARAM_VALUE(body) => body.ser(version, bytes),
36177            Self::PING(body) => body.ser(version, bytes),
36178            Self::PLAY_TUNE(body) => body.ser(version, bytes),
36179            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
36180            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36181            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36182            Self::POWER_STATUS(body) => body.ser(version, bytes),
36183            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
36184            Self::RADIO_STATUS(body) => body.ser(version, bytes),
36185            Self::RAW_IMU(body) => body.ser(version, bytes),
36186            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
36187            Self::RAW_RPM(body) => body.ser(version, bytes),
36188            Self::RC_CHANNELS(body) => body.ser(version, bytes),
36189            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
36190            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
36191            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
36192            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
36193            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
36194            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
36195            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
36196            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
36197            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
36198            Self::SCALED_IMU(body) => body.ser(version, bytes),
36199            Self::SCALED_IMU2(body) => body.ser(version, bytes),
36200            Self::SCALED_IMU3(body) => body.ser(version, bytes),
36201            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
36202            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
36203            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
36204            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
36205            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
36206            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
36207            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
36208            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
36209            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
36210            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
36211            Self::SET_MODE(body) => body.ser(version, bytes),
36212            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
36213            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
36214            Self::SIM_STATE(body) => body.ser(version, bytes),
36215            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
36216            Self::STATUSTEXT(body) => body.ser(version, bytes),
36217            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
36218            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
36219            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
36220            Self::SYS_STATUS(body) => body.ser(version, bytes),
36221            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
36222            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
36223            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
36224            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
36225            Self::TIMESYNC(body) => body.ser(version, bytes),
36226            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
36227            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
36228            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
36229            Self::TUNNEL(body) => body.ser(version, bytes),
36230            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
36231            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
36232            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
36233            Self::V2_EXTENSION(body) => body.ser(version, bytes),
36234            Self::VFR_HUD(body) => body.ser(version, bytes),
36235            Self::VIBRATION(body) => body.ser(version, bytes),
36236            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36237            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
36238            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
36239            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
36240            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
36241            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
36242            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
36243            Self::WINCH_STATUS(body) => body.ser(version, bytes),
36244            Self::WIND_COV(body) => body.ser(version, bytes),
36245        }
36246    }
36247    fn extra_crc(id: u32) -> u8 {
36248        match id {
36249            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36250            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
36251            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
36252            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
36253            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
36254            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
36255            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
36256            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
36257            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
36258            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
36259            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
36260            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36261                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
36262            }
36263            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
36264            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
36265            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
36266            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
36267            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
36268            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
36269            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
36270            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
36271            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
36272            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
36273            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
36274            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
36275            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
36276            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
36277            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
36278            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
36279            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
36280            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
36281            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
36282            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
36283            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
36284            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
36285            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
36286            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
36287            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
36288            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
36289            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
36290            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
36291            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
36292            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
36293            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
36294            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
36295                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
36296            }
36297            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
36298                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
36299            }
36300            CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
36301            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
36302            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
36303            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
36304            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
36305            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
36306            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
36307            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
36308            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
36309            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
36310            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
36311            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
36312            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
36313            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
36314            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
36315            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
36316            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
36317            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
36318            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
36319            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
36320            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
36321            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
36322            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
36323            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
36324            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
36325            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
36326            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
36327            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36328                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
36329            }
36330            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
36331            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
36332            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
36333            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
36334            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36335                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
36336            }
36337            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
36338            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
36339            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36340            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
36341            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
36342            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
36343            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
36344            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
36345            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
36346            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
36347            HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
36348            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
36349                HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
36350            }
36351            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
36352            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
36353            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
36354            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
36355            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
36356            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
36357            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
36358            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
36359            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
36360            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
36361            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
36362            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
36363            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
36364            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
36365            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
36366            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
36367            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
36368            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
36369            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
36370            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36371                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
36372            }
36373            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
36374            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
36375            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
36376            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
36377            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
36378            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
36379            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
36380            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
36381            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
36382            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
36383            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
36384            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
36385            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
36386            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
36387            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
36388            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
36389            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
36390            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
36391            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
36392            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
36393            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
36394            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
36395            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
36396            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
36397            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
36398            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
36399            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
36400            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
36401            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
36402            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
36403            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
36404            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
36405            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
36406            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
36407            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
36408            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
36409            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
36410            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
36411            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
36412            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
36413            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
36414            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
36415            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
36416            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
36417            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
36418            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
36419            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
36420            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
36421            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
36422            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
36423            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
36424            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
36425            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
36426            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
36427            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
36428            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
36429            PING_DATA::ID => PING_DATA::EXTRA_CRC,
36430            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
36431            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
36432            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
36433            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36434            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
36435            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
36436            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
36437            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
36438            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
36439            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
36440            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
36441            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
36442            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
36443            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
36444            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
36445            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
36446            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
36447            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
36448            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
36449            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
36450            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
36451            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
36452            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
36453            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
36454            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
36455            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
36456            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
36457            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
36458            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
36459            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
36460            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
36461            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
36462            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
36463            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
36464            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
36465                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
36466            }
36467            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
36468            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
36469            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
36470            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
36471            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
36472            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
36473            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
36474            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
36475            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
36476            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
36477            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
36478            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
36479            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
36480            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
36481            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36482                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
36483            }
36484            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36485                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
36486            }
36487            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
36488            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
36489            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
36490            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
36491            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
36492            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
36493            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
36494            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36495            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
36496            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
36497            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
36498            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
36499            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
36500            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
36501            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
36502            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
36503            _ => 0,
36504        }
36505    }
36506    fn target_system_id(&self) -> Option<u8> {
36507        match self {
36508            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
36509            Self::CANFD_FRAME(inner) => Some(inner.target_system),
36510            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
36511            Self::CAN_FRAME(inner) => Some(inner.target_system),
36512            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
36513            Self::COMMAND_ACK(inner) => Some(inner.target_system),
36514            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
36515            Self::COMMAND_INT(inner) => Some(inner.target_system),
36516            Self::COMMAND_LONG(inner) => Some(inner.target_system),
36517            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
36518            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
36519            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
36520            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
36521            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
36522            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
36523            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
36524            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
36525            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
36526            Self::LOGGING_ACK(inner) => Some(inner.target_system),
36527            Self::LOGGING_DATA(inner) => Some(inner.target_system),
36528            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
36529            Self::LOG_ERASE(inner) => Some(inner.target_system),
36530            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
36531            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
36532            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
36533            Self::MISSION_ACK(inner) => Some(inner.target_system),
36534            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
36535            Self::MISSION_COUNT(inner) => Some(inner.target_system),
36536            Self::MISSION_ITEM(inner) => Some(inner.target_system),
36537            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
36538            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
36539            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
36540            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
36541            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
36542            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
36543            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
36544            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
36545            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
36546            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
36547            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
36548            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
36549            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
36550            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
36551            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
36552            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
36553            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
36554            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
36555            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
36556            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
36557            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
36558            Self::PARAM_SET(inner) => Some(inner.target_system),
36559            Self::PING(inner) => Some(inner.target_system),
36560            Self::PLAY_TUNE(inner) => Some(inner.target_system),
36561            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
36562            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
36563            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
36564            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
36565            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
36566            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
36567            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
36568            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
36569            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
36570            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
36571            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
36572            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
36573            Self::SET_MODE(inner) => Some(inner.target_system),
36574            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
36575            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
36576            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
36577            Self::TIMESYNC(inner) => Some(inner.target_system),
36578            Self::TUNNEL(inner) => Some(inner.target_system),
36579            Self::V2_EXTENSION(inner) => Some(inner.target_system),
36580            _ => None,
36581        }
36582    }
36583    fn target_component_id(&self) -> Option<u8> {
36584        match self {
36585            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
36586            Self::CANFD_FRAME(inner) => Some(inner.target_component),
36587            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
36588            Self::CAN_FRAME(inner) => Some(inner.target_component),
36589            Self::COMMAND_ACK(inner) => Some(inner.target_component),
36590            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
36591            Self::COMMAND_INT(inner) => Some(inner.target_component),
36592            Self::COMMAND_LONG(inner) => Some(inner.target_component),
36593            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
36594            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
36595            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
36596            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
36597            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
36598            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
36599            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
36600            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
36601            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
36602            Self::LOGGING_ACK(inner) => Some(inner.target_component),
36603            Self::LOGGING_DATA(inner) => Some(inner.target_component),
36604            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
36605            Self::LOG_ERASE(inner) => Some(inner.target_component),
36606            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
36607            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
36608            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
36609            Self::MISSION_ACK(inner) => Some(inner.target_component),
36610            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
36611            Self::MISSION_COUNT(inner) => Some(inner.target_component),
36612            Self::MISSION_ITEM(inner) => Some(inner.target_component),
36613            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
36614            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
36615            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
36616            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
36617            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
36618            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
36619            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
36620            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
36621            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
36622            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
36623            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
36624            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
36625            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
36626            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
36627            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
36628            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
36629            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
36630            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
36631            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
36632            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
36633            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
36634            Self::PARAM_SET(inner) => Some(inner.target_component),
36635            Self::PING(inner) => Some(inner.target_component),
36636            Self::PLAY_TUNE(inner) => Some(inner.target_component),
36637            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
36638            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
36639            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
36640            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
36641            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
36642            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
36643            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
36644            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
36645            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
36646            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
36647            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
36648            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
36649            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
36650            Self::TIMESYNC(inner) => Some(inner.target_component),
36651            Self::TUNNEL(inner) => Some(inner.target_component),
36652            Self::V2_EXTENSION(inner) => Some(inner.target_component),
36653            _ => None,
36654        }
36655    }
36656}